mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
prepend tests with a ! to omit a particular test from the test suite
This commit is contained in:
parent
1913fed33b
commit
0db40018af
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user