prepend tests with a ! to omit a particular test from the test suite

This commit is contained in:
Eric Rowell 2012-11-15 21:33:39 -08:00
parent 1913fed33b
commit 0db40018af
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ To run unit tests, you'll need to build the `unitTests.js` file by running `thor
To add / modify unit tests, be sure to do so in the `tests/js/unit` directory, because these are the source test files that are concatenated together when building `unitTests.js`. Use `test()` for hard tests which will throw an error if something fails, and use `warn()` for soft tests that will allow the tests to continue if the test condition fails. The `warn()` method is great for tests that will have different results in different browsers, such as canvas data url comparisons, text metric dimensions, etc. All tests should pass in Google Chrome with no warnings, and all tests should pass with some warnings in other browsers.
TIP: prepend a test name with a `*` to only run that particular test, or prepend a test name with `x` to omit that test.
TIP: prepend a test name with a `*` to only run that particular test, or prepend a test name with `!` to omit that test.
#Pull Requests
I'd be happy to review any pull requests that may better the KineticJS project, in particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the unit tests and functional tests pass.

View File

@ -94,7 +94,7 @@ Test.prototype = {
// loop through tests
for(var key in tests) {
if(key.charAt(0) !== 'x' && (!testOnlySpecial || key.charAt(0) === '*')) {
if(key.charAt(0) !== '!' && (!testOnlySpecial || key.charAt(0) === '*')) {
var obj = this.addTestContainer(key);
this.counter++;
console.log(this.counter + ') ' + key);