-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test files to use new non-global QUnit syntax. Update bridge between this grunt plugin and phantomjs: * Remove deprecated autorun QUnit option. Update devDependency qunitjs to 2.3.0. Update Gruntfile to account for failed tests.
- Loading branch information
Showing
7 changed files
with
36 additions
and
36 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
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,14 +1,14 @@ | ||
module('module1'); | ||
QUnit.module('module1'); | ||
|
||
test('basic test', function() { | ||
expect(1); | ||
ok(true, 'this had better work.'); | ||
QUnit.test('basic test', function(assert) { | ||
assert.expect(1); | ||
assert.ok(true, 'this had better work.'); | ||
}); | ||
|
||
|
||
module('module2'); | ||
QUnit.module('module2'); | ||
|
||
test('a second basic test', function() { | ||
expect(1); | ||
ok(true, 'this had better work.'); | ||
QUnit.test('a second basic test', function(assert) { | ||
assert.expect(1); | ||
assert.ok(true, 'this had better work.'); | ||
}); |
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,17 +1,15 @@ | ||
|
||
var pushFailure = QUnit.pushFailure; | ||
var failures = []; | ||
QUnit.log(function( details ) { | ||
if (details.result === false) | ||
failures.push(details.message); | ||
}); | ||
|
||
test('global pollution', function(assert) { | ||
QUnit.todo('global pollution', function(assert) { | ||
window.pollute = true; | ||
assert.ok(pollute, 'nasty pollution'); | ||
QUnit.pushFailure = function(message) { | ||
failures.push(message); | ||
}; | ||
}); | ||
|
||
test('actually check for global pollution', function() { | ||
expect(1); | ||
QUnit.pushFailure = pushFailure; | ||
deepEqual(failures, ['Introduced global variable(s): pollute']); | ||
QUnit.test('actually check for global pollution', function(assert) { | ||
assert.expect(1); | ||
assert.deepEqual(failures, ['Introduced global variable(s): pollute']); | ||
}); |
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,12 +1,12 @@ | ||
|
||
test('basic test', function() { | ||
expect(1); | ||
ok(true, 'this had better work.'); | ||
QUnit.test('basic test', function(assert) { | ||
assert.expect(1); | ||
assert.ok(true, 'this had better work.'); | ||
}); | ||
|
||
|
||
test('can access the DOM', function() { | ||
expect(1); | ||
QUnit.test('can access the DOM', function(assert) { | ||
assert.expect(1); | ||
var fixture = document.getElementById('qunit-fixture'); | ||
equal(fixture.innerText, 'this had better work.', 'should be able to access the DOM.'); | ||
assert.equal(fixture.innerText, 'this had better work.', 'should be able to access the DOM.'); | ||
}); |
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,12 +1,12 @@ | ||
|
||
test('basic test', function() { | ||
expect(1); | ||
ok(0, 'this had better work.'); | ||
QUnit.test('basic test', function(assert) { | ||
assert.expect(1); | ||
assert.ok(0, 'this had better work.'); | ||
}); | ||
|
||
|
||
test('can access the DOM', function() { | ||
expect(1); | ||
QUnit.test('can access the DOM', function(assert) { | ||
assert.expect(1); | ||
var fixture = document.getElementById('qunit-fixture'); | ||
equal(fixture.innerText, 'this had better work.', 'should be able to access the DOM.'); | ||
assert.equal(fixture.innerText, 'this had better work.', 'should be able to access the DOM.'); | ||
}); |