(editor: Editor)
| 112 | let totalNumPages = 0 |
| 113 | |
| 114 | function arrowsAreSound(editor: Editor) { |
| 115 | const arrows = editor.getCurrentPageShapes().filter((s) => s.type === 'arrow') |
| 116 | for (const arrow of arrows) { |
| 117 | const bindings = editor.getBindingsFromShape(arrow, 'arrow') |
| 118 | const terminalsSeen = new Set() |
| 119 | for (const binding of bindings) { |
| 120 | if (terminalsSeen.has(binding.props.terminal)) { |
| 121 | return false |
| 122 | } |
| 123 | |
| 124 | terminalsSeen.add(binding.props.terminal) |
| 125 | |
| 126 | if (!editor.store.has(binding.toId)) { |
| 127 | return false |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | return true |
| 132 | } |
| 133 | |
| 134 | function runTest(seed: number) { |
| 135 | reseed(seed) |
no test coverage detected
searching dependent graphs…