1import { describe, expect, it } from "@effect/vitest";
2
3import { stableStringify } from "./relaySigning.ts";
4
5describe("relaySigning", () => {
6 it("canonicalizes object keys recursively", () => {
7 expect(
8 stableStringify({
9 z: 1,
10 a: {
11 y: true,
12 b: null,
13 },
14 list: [{ c: "three", a: "one" }],
15 }),
16 ).toBe('{"a":{"b":null,"y":true},"list":[{"a":"one","c":"three"}],"z":1}');
17 });
18});