From c6622a65d70340bcd8d6e3adfd99db28f4c82c2f Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 13 Apr 2018 13:33:55 -0700 Subject: [PATCH] convert test/interfaces/qunit.spec.js to unexpected Signed-off-by: Christopher Hiller --- test/interfaces/qunit.spec.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/test/interfaces/qunit.spec.js b/test/interfaces/qunit.spec.js index 0d15272f0b..8a555cbb09 100644 --- a/test/interfaces/qunit.spec.js +++ b/test/interfaces/qunit.spec.js @@ -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); });