From cad37abdb772b484468ae9636f873c73a342b257 Mon Sep 17 00:00:00 2001 From: Duncan Holm Date: Tue, 27 Feb 2018 05:58:01 +0000 Subject: [PATCH] Stop using squirrelly functions from assert: "Knowing what we now know, if we were designing/building Node.js core all over again, the assert module would either not exist in Node.js or else consist of far fewer functions--quite possibly just assert() (which is currently an alias for assert.ok())." see https://github.com/nodejs/node/issues/5312#issuecomment-244282781 --- src/test/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/index.js b/src/test/index.js index 935209a..833cd7d 100644 --- a/src/test/index.js +++ b/src/test/index.js @@ -3,12 +3,13 @@ var affaGuid = require('..') describe('affa guid', function () { var N = 1000 - var generated before(function () { assert(N >= 2, 'Tests need multiple UUIDs to be generated') }) + var generated + beforeEach(function () { generated = {} for (var i = 0; i < N; i++) { @@ -23,6 +24,6 @@ describe('affa guid', function () { }) it('Generates UUIDs that are unique each time', function () { - assert.strictEqual(Object.keys(generated).length, N) + assert(Object.keys(generated).length === N) }) })