import assert from 'node:assert/strict';
import test from 'node:test';

import { canonicalJson } from './canonicalJson';

void test('canonicalJson: стабильный порядок ключей', () => {
  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}');
});
