Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
Stop using squirrelly functions from assert:
Browse files Browse the repository at this point in the history
"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 nodejs/node#5312 (comment)
  • Loading branch information
frou committed Feb 27, 2018
1 parent 06f0c33 commit cad37ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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)
})
})

0 comments on commit cad37ab

Please sign in to comment.