run npm install to generate a package lock

This commit is contained in:
sashinexists
2024-12-07 13:18:31 +11:00
parent e7d08a91b5
commit 23437d228e
2501 changed files with 290663 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import assert from "node:assert";
import { describe, test } from "node:test";
import { ObjectTree } from "../../src/internal.js";
import deepValuesIterator from "../../src/operations/deepValuesIterator.js";
describe("deepValuesIterator", () => {
test("returns an iterator of a tree's deep values", async () => {
const tree = new ObjectTree({
a: 1,
b: 2,
more: {
c: 3,
d: 4,
},
});
const values = [];
// The tree will be shallow, but we'll ask to expand the values.
for await (const value of deepValuesIterator(tree, { expand: true })) {
values.push(value);
}
assert.deepEqual(values, [1, 2, 3, 4]);
});
});