Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Node tests now reuse QUnit tests, replacing nodeunit
Fixes #18
- Loading branch information
Showing
9 changed files
with
244 additions
and
426 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
/* API Ref: http://api.qunitjs.com */ | ||
/* globals Dexter:true, QUnit: true, expect: true */ | ||
/* globals QUnit: true */ | ||
|
||
QUnit.module( 'Environment' ); | ||
(function() { | ||
|
||
QUnit.test( 'Dexter is here!', function( assert ) { | ||
expect( 2 ); | ||
var Dexter; | ||
|
||
assert.equal( typeof( Dexter ), 'object', 'Dexter is an object' ); | ||
assert.ok( Dexter, 'Dexter is not falsy' ); | ||
}); | ||
// NPM scope | ||
if ( !Dexter && typeof module !== 'undefined' && module.exports ) { | ||
Dexter = require( '../../src/Dexter.js' ); | ||
} else { | ||
Dexter = window.Dexter; | ||
} | ||
|
||
QUnit.test( 'Dexter functions', function( assert ) { | ||
expect( 3 ); | ||
QUnit.module( 'Environment' ); | ||
|
||
assert.equal( typeof( Dexter.spy ), 'function', 'Dexter.spy is a function' ); | ||
assert.equal( typeof( Dexter.fake ), 'function', 'Dexter.fake is a function' ); | ||
assert.equal( typeof( Dexter.fakeXHR ), 'function', 'Dexter.fakeXHR is a function' ); | ||
}); | ||
QUnit.test( 'Dexter is here!', function( assert ) { | ||
assert.equal( typeof( Dexter ), 'object', 'Dexter is an object' ); | ||
assert.ok( Dexter, 'Dexter is not falsy' ); | ||
}); | ||
|
||
QUnit.test( 'Dexter functions', function( assert ) { | ||
assert.equal( typeof( Dexter.spy ), 'function', 'Dexter.spy is a function' ); | ||
assert.equal( typeof( Dexter.fake ), 'function', 'Dexter.fake is a function' ); | ||
}); | ||
|
||
}()); |
Oops, something went wrong.