Skip to content

Commit

Permalink
convert test/interfaces/exports.spec.js to unexpected
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Apr 21, 2018
1 parent cabda05 commit 1ecd62f
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions test/interfaces/exports.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ exports.Array = {

after: function () {
calls.push('after');
expect(calls)
.to
.eql([
'before',
'before each',
'one',
'after each',
'before each',
'two',
'after each',
'after'
]);
expect(calls, 'to equal', [
'before',
'before each',
'one',
'after each',
'before each',
'two',
'after each',
'after'
]);
},

'#indexOf()': {
Expand All @@ -34,15 +32,15 @@ exports.Array = {

'should return -1 when the value is not present': function () {
calls.push('one');
expect([1, 2, 3].indexOf(5)).to.equal(-1);
expect([1, 2, 3].indexOf(0)).to.equal(-1);
expect([1, 2, 3].indexOf(5), 'to be', -1);
expect([1, 2, 3].indexOf(0), 'to be', -1);
},

'should return the correct index when the value is present': function () {
calls.push('two');
expect([1, 2, 3].indexOf(1)).to.equal(0);
expect([1, 2, 3].indexOf(2)).to.equal(1);
expect([1, 2, 3].indexOf(3)).to.equal(2);
expect([1, 2, 3].indexOf(1), 'to be', 0);
expect([1, 2, 3].indexOf(2), 'to be', 1);
expect([1, 2, 3].indexOf(3), 'to be', 2);
}
}
};

0 comments on commit 1ecd62f

Please sign in to comment.