Files
sashinexists/node_modules/@weborigami/async-tree/test/jsonKeys.test.js
2024-12-07 13:18:31 +11:00

16 lines
466 B
JavaScript

import { DeepObjectTree } from "@weborigami/async-tree";
import assert from "node:assert";
import { describe, test } from "node:test";
import * as jsonKeys from "../src/jsonKeys.js";
describe("jsonKeys", () => {
test("stringifies JSON Keys", async () => {
const tree = new DeepObjectTree({
about: {},
"index.html": "Home",
});
const json = await jsonKeys.stringify(tree);
assert.strictEqual(json, '["about/","index.html"]');
});
});