UNPKG

@hello.nrfcloud.com/proto

Version:

Documents the communication protocol between the hello.nrfcloud.com backend and the web application

15 lines (14 loc) 540 B
import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; import { fingerprintGenerator } from './fingerprintGenerator.js'; import { isFingerprint } from './isFingerprint.js'; void describe('fingerprintGenerator()', function() { void it('should generated a fingerprint', function() { var gen = fingerprintGenerator(666); var fp1 = gen(); var fp2 = gen(); assert.match(fp1, /^29a\./); assert.equal(isFingerprint(fp1), true); assert.notEqual(fp1, fp2); }); });