diff --git a/tests.js b/tests.js index fa9631c..64798a4 100644 --- a/tests.js +++ b/tests.js @@ -2,7 +2,7 @@ import assert from 'assert/strict' import { randomString } from './benchmark/benchmark.js' -import { minidenticon as minidenticon_CE } from './minidenticons.js' +import { minidenticon as minidenticon_CE } from './minidenticons.min.js' import { minidenticon as minidenticon_NO_CE } from './no-custom-element.min.js' @@ -12,25 +12,25 @@ console.time("\nTests duration") // minidenticon tests -// new Array(minidenticon_CE, minidenticon_NO_CE).forEach(minidenticon => { - -// // non-integer hue normal for empty string -// assert.equal(minidenticon(""), '') -// assert.equal(minidenticon("foo"), '') -// assert.equal(minidenticon("foo", 75), '') -// assert.equal(minidenticon("foo", undefined, 75), '') -// assert.equal(minidenticon("dude42"), '') - -// for (let saturation = 0; saturation < 100; saturation += 5) { -// for (let lightness = 0; lightness < COLLISION_TESTS_NUMBER; lightness += 5) { -// assert.equal( -// minidenticon("foo", saturation, lightness), -// `` -// ) -// } -// } - -// }) +new Array(minidenticon_CE, minidenticon_NO_CE).forEach(minidenticon => { + + // non-integer hue normal for empty string + assert.equal(minidenticon(""), '') + assert.equal(minidenticon("foo"), '') + assert.equal(minidenticon("foo", 75), '') + assert.equal(minidenticon("foo", undefined, 75), '') + assert.equal(minidenticon("laurent"), '') + + for (let saturation = 0; saturation < 100; saturation += 5) { + for (let lightness = 0; lightness < COLLISION_TESTS_NUMBER; lightness += 5) { + assert.equal( + minidenticon("foo", saturation, lightness), + `` + ) + } + } + +}) // collision tests