MCPcopy Index your code
hub / github.com/hizzgdev/jsmind / checkMindData

Function checkMindData

tests/unit/jsmind.format.test.js:56–80  ·  view source on GitHub ↗
(mind)

Source from the content-addressed store, hash-verified

54});
55
56function checkMindData(mind) {
57 expect(mind.name).toBe(fakeMindName);
58 expect(mind.author).toBe(fakeMindAuthor);
59 expect(mind.version).toBe(fakeVersion);
60
61 const rootNode = mind.root;
62 expect(rootNode.id).toBe('root');
63 expect(rootNode.topic).toBe('jsMind');
64 expect(rootNode.children.length).toBe(1);
65
66 const node1 = rootNode.children[0];
67 expect(node1.id).toBe('easy');
68 expect(node1.topic).toBe('Easy');
69 expect(node1.direction).toBe(Direction.left);
70 expect(node1.expanded).toBe(false);
71 expect(node1.children.length).toBe(1);
72 expect(node1.data['background-color']).toBe('#ffffff');
73
74 const node2 = node1.children[0];
75 expect(node2.id).toBe('easy1');
76 expect(node2.topic).toBe('Easy to show');
77 expect(node2.data.ext).toBe('addition data');
78 expect(node2.children.length).toBe(0);
79 expect(node2.data['foreground-color']).toBe('#000000');
80}
81
82function checkTextMindData(mind) {
83 expect(mind.name).toBe(fakeMindName);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected