| 80 | } |
| 81 | |
| 82 | function checkTextMindData(mind) { |
| 83 | expect(mind.name).toBe(fakeMindName); |
| 84 | expect(mind.author).toBe(fakeMindAuthor); |
| 85 | expect(mind.version).toBe(fakeVersion); |
| 86 | |
| 87 | const rootNode = mind.root; |
| 88 | expect(rootNode.topic).toBe('jsMind'); |
| 89 | expect(rootNode.children.length).toBe(1); |
| 90 | |
| 91 | const node1 = rootNode.children[0]; |
| 92 | expect(node1.topic).toBe('Easy'); |
| 93 | expect(node1.children.length).toBe(1); |
| 94 | |
| 95 | const node2 = node1.children[0]; |
| 96 | expect(node2.topic).toBe('Easy to show'); |
| 97 | expect(node2.children.length).toBe(0); |
| 98 | } |
| 99 | |
| 100 | const fakeMindName = 'test jsmind'; |
| 101 | const fakeMindAuthor = 'hizzgdev'; |