MCPcopy
hub / github.com/loggerhead/json4u / check

Function check

__tests__/parse.test.ts:13–19  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

11 expect(tree.toJSON()).toEqual(JSON.parse(expected));
12
13 const check = (node: Node) => {
14 expect(node.id.startsWith(rootMarker)).toEqual(true);
15 if (!isIterable(node)) {
16 expect(tree.text.substring(node.offset, node.offset + node.length)).toEqual(getRawValue(node));
17 }
18 tree.mapChildren(node, (child) => check(child));
19 };
20
21 check(tree.root());
22}

Callers 1

expectEqFunction · 0.85

Calls 3

isIterableFunction · 0.90
getRawValueFunction · 0.90
mapChildrenMethod · 0.80

Tested by

no test coverage detected