MCPcopy Create free account
hub / github.com/nodejs/node / test

Function test

test/sequential/test-crypto-timing-safe-equal.js:45–49  ·  view source on GitHub ↗
(a, b, { equal, sameValue, timingSafeEqual })

Source from the content-addressed store, hash-verified

43 const is = cmp(Object.is);
44
45 function test(a, b, { equal, sameValue, timingSafeEqual }) {
46 assert.strictEqual(eq(a, b), equal);
47 assert.strictEqual(is(a, b), sameValue);
48 assert.strictEqual(crypto.timingSafeEqual(a, b), timingSafeEqual);
49 }
50
51 test(new Float32Array([NaN]), new Float32Array([NaN]), {
52 equal: false,

Calls 2

isFunction · 0.85
eqFunction · 0.50

Tested by

no test coverage detected