Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
139 changed files
with
23,680 additions
and
18,171 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
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
14 changes: 7 additions & 7 deletions
14
externaltests/assertionSucceedsWhilePromiseIsPending.spec.js
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 @@ | ||
var expect = require('../lib'); | ||
|
||
expect.addAssertion('<any> to bar', function (expect, subject) { | ||
expect(subject, 'to equal', 'bar'); | ||
return expect.promise(function (resolve, reject) {}); | ||
expect.addAssertion('<any> to bar', function(expect, subject) { | ||
expect(subject, 'to equal', 'bar'); | ||
return expect.promise(function(resolve, reject) {}); | ||
}); | ||
|
||
expect.addAssertion('<any> to foo', function (expect) { | ||
expect('bar', 'to bar'); | ||
expect.addAssertion('<any> to foo', function(expect) { | ||
expect('bar', 'to bar'); | ||
}); | ||
|
||
it('should call the callback', function () { | ||
expect('foo', 'to foo'); | ||
it('should call the callback', function() { | ||
expect('foo', 'to foo'); | ||
}); |
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,14 @@ | ||
var expect = require('../lib'); | ||
it('should not dot out the object in the diff', function () { | ||
expect(function () { | ||
expect({0: {0: {0: {0: {0: {0: {}}}}}}}, 'to equal', {}); | ||
}, 'to throw', | ||
"expected { 0: { 0: { 0: { 0: { 0: { 0: ... } } } } } } to equal {}\n" + | ||
"\n" + | ||
"{\n" + | ||
" 0: { 0: { 0: { 0: { 0: { 0: {} } } } } } // should be removed\n" + | ||
"}" | ||
); | ||
it('should not dot out the object in the diff', function() { | ||
expect( | ||
function() { | ||
expect({ 0: { 0: { 0: { 0: { 0: { 0: {} } } } } } }, 'to equal', {}); | ||
}, | ||
'to throw', | ||
'expected { 0: { 0: { 0: { 0: { 0: { 0: ... } } } } } } to equal {}\n' + | ||
'\n' + | ||
'{\n' + | ||
' 0: { 0: { 0: { 0: { 0: { 0: {} } } } } } // should be removed\n' + | ||
'}' | ||
); | ||
}); |
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,13 +1,19 @@ | ||
var expect = require('../lib'); | ||
|
||
expect.addAssertion('<any> when delayed a little bit <assertion?>', function (expect, subject) { | ||
return expect.promise(function (run) { | ||
setTimeout(run(function () { | ||
return expect.shift(); | ||
}), 1); | ||
}); | ||
expect.addAssertion('<any> when delayed a little bit <assertion?>', function( | ||
expect, | ||
subject | ||
) { | ||
return expect.promise(function(run) { | ||
setTimeout( | ||
run(function() { | ||
return expect.shift(); | ||
}), | ||
1 | ||
); | ||
}); | ||
}); | ||
|
||
it('should magically change', function () { | ||
return expect('abc', 'when delayed a little bit', 'to equal', 'def'); | ||
it('should magically change', function() { | ||
return expect('abc', 'when delayed a little bit', 'to equal', 'def'); | ||
}); |
6 changes: 3 additions & 3 deletions
6
externaltests/forgotToReturnPendingPromiseFromFailingItBlock.spec.js
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,6 +1,6 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should call the callback', function () { | ||
expect(function () {}, 'to call the callback'); | ||
expect(true, 'to be falsy'); | ||
it('should call the callback', function() { | ||
expect(function() {}, 'to call the callback'); | ||
expect(true, 'to be falsy'); | ||
}); |
4 changes: 2 additions & 2 deletions
4
externaltests/forgotToReturnPendingPromiseFromItSuccessfulItBlock.spec.js
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,5 +1,5 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should call the callback', function () { | ||
expect(function () {}, 'to call the callback'); | ||
it('should call the callback', function() { | ||
expect(function() {}, 'to call the callback'); | ||
}); |
4 changes: 2 additions & 2 deletions
4
externaltests/forgotToReturnPendingPromiseFromSuccessfulItBlock.spec.js
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,5 +1,5 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should call the callback', function () { | ||
expect(function () {}, 'to call the callback'); | ||
it('should call the callback', function() { | ||
expect(function() {}, 'to call the callback'); | ||
}); |
16 changes: 8 additions & 8 deletions
16
externaltests/forgotToReturnPromiseRejectedInTheNextTick.spec.js
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 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should fail', function () { | ||
expect.addAssertion('<any> to foo', function (expect, subject) { | ||
return expect.promise(function (resolve, reject) { | ||
setImmediate(function () { | ||
reject(new Error('argh')); | ||
}); | ||
}); | ||
it('should fail', function() { | ||
expect.addAssertion('<any> to foo', function(expect, subject) { | ||
return expect.promise(function(resolve, reject) { | ||
setImmediate(function() { | ||
reject(new Error('argh')); | ||
}); | ||
}); | ||
expect('bar', 'to foo'); | ||
}); | ||
expect('bar', 'to foo'); | ||
}); |
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,5 +1,7 @@ | ||
var expect = require('../lib').clone().use(require('./node_modules/unexpected-bogus/index.js')); | ||
var expect = require('../lib') | ||
.clone() | ||
.use(require('./node_modules/unexpected-bogus/index.js')); | ||
|
||
it('should fail with a full trace', function () { | ||
expect('abc', 'to be bogus'); | ||
it('should fail with a full trace', function() { | ||
expect('abc', 'to be bogus'); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should foo', function () { | ||
return expect(function () { | ||
return expect.promise(function () { | ||
(function thisIsImportant() { | ||
throw new Error('argh'); | ||
}()); | ||
}); | ||
}, 'not to error'); | ||
it('should foo', function() { | ||
return expect(function() { | ||
return expect.promise(function() { | ||
(function thisIsImportant() { | ||
throw new Error('argh'); | ||
})(); | ||
}); | ||
}, 'not to error'); | ||
}); |
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,5 +1,5 @@ | ||
var expect = require('../lib'); | ||
|
||
it('should call the callback', function () { | ||
expect(true, 'to be true'); | ||
it('should call the callback', function() { | ||
expect(true, 'to be true'); | ||
}); |
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,3 +1,3 @@ | ||
module.exports = function AssertionString(text) { | ||
this.text = text; | ||
this.text = text; | ||
}; |
Oops, something went wrong.