summaryrefslogtreecommitdiff
path: root/tests/sw.js
blob: cff37bcff06c99628d60702bde236dd9f78019a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import {
	leafValues,
} from "../src/content/sw.exported.js";



const test_leafValues = async t => {
	t.start("leafValues()");

	t.test("noop on empty object", () => {
		t.assert.deepEqual(leafValues({}), []);
	});

	t.test("flat array for flat tree", () => {
	});

	t.test("array of empty arrays for leafless tree", () => {
		t.assert.deepEqual(leafValues({ a: {} }), [[]]);
	});
};



export const allTests = [
	test_leafValues,
];