forked from qunitjs/qunit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several of the HTML test suites were previously omitted from CI, as they either couldn't pass on PhantomJS, or were simply forgotten. * Add test/headless.html. Also updated to use `QUnit.on()`, and to hide debug messages when run in CI to avoid adding this noise. * Add test/module-filter.html * Add test/performance-mark.html. Ref qunitjs#1319. * Add test/webWorker.html. Ref qunitjs#1171. * Remove test/each.html. Duplicate of test/index.html. * Remove test/stack-errors.html. Redundant with other tests for "noglobals" and "onUncaughtError" outside test context etc. * Improve test/sandboxed-iframe.html, which was passing CI but failing manually, due to undefined `__grunt_contrib_qunit__`. We now define a fallback locally to ease debugging. Added to test-on-node: test/module-skip.js, test/module-todo.js. These were disabled due to use of hacky `QUnit.done()`, but that was recently fixed with 78bda44. Also add various main tests to test/webWorker.js, which had not been updated in a while. The next commit will add a meta CLI test that ensures that these are all in sync to avoid staleness in the future. Ref qunitjs#1511.
- Loading branch information
Showing
10 changed files
with
79 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
( function( window ) { | ||
QUnit.module( "Web Worker" ); | ||
|
||
QUnit.module( "Runs a QUnit suite in a Web Worker" ); | ||
var testMethod = window.Worker ? "test" : "skip"; | ||
|
||
var testMethod = window.Worker ? "test" : "skip"; | ||
QUnit[ testMethod ]( "main tests", function( assert ) { | ||
assert.expect( 1 ); | ||
var done = assert.async(); | ||
var worker = new Worker( "webWorker-worker.js" ); | ||
|
||
QUnit[ testMethod ]( "test", function( assert ) { | ||
assert.expect( 1 ); | ||
var done = assert.async(); | ||
var worker = new Worker( "webWorker-worker.js" ); | ||
|
||
worker.onmessage = function( event ) { | ||
assert.equal( event.data.status, "passed" ); | ||
done(); | ||
}; | ||
} ); | ||
|
||
}( ( function() { | ||
return this; | ||
}() ) ) ); | ||
worker.onmessage = function( event ) { | ||
assert.equal( event.data.status, "passed", "runEnd.status" ); | ||
done(); | ||
}; | ||
} ); |