-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor assertion helpers into QUnit.assert (backwards compatible)
- QUnit.assert * Now contains all assertion helpers (kept equals and same out of it, those are only in QUnit itself) * Had to move QUnit.test / QUnit.stop up in the code so that they're not inside QUnit.assert. The actual test/stop functions have not been altered. * Per #228 discussion, new standard format created by this: <pre> // Test runner QUnit.assert.cowType = function ( cow, expected, message ) { QUnit.push( .. , expected, message ); }; // Test suite QUnit.test( "FooCow and BarCow defaults", function ( assert ) { var bar, foo; expect( 1 ); bar = new BarCow(); foo = new FooCow(); assert.strictEqual( foo.name, "", "A FooCow has no name" ); assert.cowType( foo, "awesome", "A FooCow must be awesome" ); }); </pre> * Added unit tests for new QUnit.assert and test() "assert" argument. Also added unit tests for the old methods (global and via QUnit). * Kept rest of the test suite in tact to proof backwards compatibility. - Issues: * fixes #228 - Misc: * Added few random bits of documentation. Turned some block comments into /* .. */
- Loading branch information
Showing
2 changed files
with
116 additions
and
66 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 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