Skip to content

Commit

Permalink
convert test/interfaces/bdd.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 454018b commit cabda05
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/interfaces/bdd.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
describe('integer primitives', function () {
describe('arithmetic', function () {
it('should add', function () {
expect(1 + 1).to.equal(2);
expect(2 + 2).to.equal(4);
expect(1 + 1, 'to be', 2);
expect(2 + 2, 'to be', 4);
});

it('should subtract', function () {
expect(1 - 1).to.equal(0);
expect(2 - 1).to.equal(1);
expect(1 - 1, 'to be', 0);
expect(2 - 1, 'to be', 1);
});
});
});

describe('integer primitives', function () {
describe('arithmetic is not', function () {
it('should add', function () {
expect(1 + 1).not.to.equal(3);
expect(2 + 2).not.to.equal(5);
expect(1 + 1, 'not to equal', 3);
expect(2 + 2, 'not to equal', 5);
});
});
});
Expand All @@ -29,38 +29,38 @@ context('test suite', function () {
});

specify('share a property', function () {
expect(this.number).to.equal(5);
expect(this.number, 'to be', 5);
});
});

describe('pending suite', function () {
describe.skip('this is pending suite', function () {
it('should not run', function () {
expect(1 + 1).to.equal(3);
expect(1 + 1, 'to be', 3);
});
});
});

describe('pending tests', function () {
it.skip('should not run', function () {
expect(1 + 1).to.equal(3);
expect(1 + 1, 'to be', 3);
});
});

describe('setting timeout by appending it to test', function () {
var runningTest = it('enables users to call timeout on active tests', function () {
expect(1 + 1).to.equal(2);
expect(1 + 1, 'to be', 2);
}).timeout(1003);

var skippedTest = xit('enables users to call timeout on pending tests', function () {
expect(1 + 1).to.equal(3);
expect(1 + 1, 'to be', 3);
}).timeout(1002);

it('sets timeout on pending tests', function () {
expect(skippedTest._timeout).to.equal(1002);
expect(skippedTest._timeout, 'to be', 1002);
});

it('sets timeout on running tests', function () {
expect(runningTest._timeout).to.equal(1003);
expect(runningTest._timeout, 'to be', 1003);
});
});

0 comments on commit cabda05

Please sign in to comment.