Skip to content

Commit

Permalink
convert test/interfaces/qunit.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 1ecd62f commit c6622a6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions test/interfaces/qunit.spec.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
'use strict';

function ok (expr, msg) {
if (!expr) throw new Error(msg);
}

suite('integer primitives');

test('should add', function () {
var number = 2 + 2;
ok(number === 4);
expect(2 + 2, 'to be', 4);
});

test('should decrement', function () {
var number = 3;
ok(--number === 2);
ok(--number === 1);
ok(--number === 0);
expect(--number, 'to be', 2);
expect(--number, 'to be', 1);
expect(--number, 'to be', 0);
});

suite('String');

test('#length', function () {
ok('foo'.length === 3);
expect('foo', 'to have length', 3);
});

0 comments on commit c6622a6

Please sign in to comment.