chore: license server updates and tests

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-05-11 22:20:21 +08:00
parent 4a0523f309
commit d595f4ca5a
6 changed files with 66 additions and 18 deletions
+15
View File
@@ -0,0 +1,15 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { canonicalJson } from '../lib/canonicalJson.mjs';
void test('canonicalJson: stable key order', () => {
const a = canonicalJson({ b: 2, a: 1 });
const b = canonicalJson({ a: 1, b: 2 });
assert.equal(a, b);
assert.equal(a, '{"a":1,"b":2}');
});
void test('canonicalJson: rejects non-finite number', () => {
assert.throws(() => canonicalJson({ x: NaN }), TypeError);
});