()
| 334 | |
| 335 | // Test direction parameter types (should be string, not number) |
| 336 | function testDirectionTypes() { |
| 337 | const testOptions: JsMindOptions = { |
| 338 | container: 'test_container' |
| 339 | }; |
| 340 | const testJm = new jsMind(testOptions); |
| 341 | |
| 342 | const testData: NodeTreeFormat = { |
| 343 | meta: { name: 'test', author: 'test', version: '1.0' }, |
| 344 | format: 'node_tree', |
| 345 | data: { id: 'root', topic: 'Test Root' } |
| 346 | }; |
| 347 | |
| 348 | testJm.show(testData); |
| 349 | const testRoot = testJm.get_root(); |
| 350 | |
| 351 | if (testRoot) { |
| 352 | // Test all valid direction values |
| 353 | const leftNode = testJm.add_node(testRoot, 'left_node', 'Left Node', {}, 'left'); |
| 354 | const centerNode = testJm.add_node(testRoot, 'center_node', 'Center Node', {}, 'center'); |
| 355 | const rightNode = testJm.add_node(testRoot, 'right_node', 'Right Node', {}, 'right'); |
| 356 | |
| 357 | // Test insert methods with direction |
| 358 | if (leftNode) { |
| 359 | testJm.insert_node_before(leftNode, 'before_left', 'Before Left', {}, 'left'); |
| 360 | testJm.insert_node_after(leftNode, 'after_left', 'After Left', {}, 'left'); |
| 361 | } |
| 362 | |
| 363 | // Test move_node with special before_id values |
| 364 | if (rightNode) { |
| 365 | testJm.move_node(rightNode.id, '_first_', testRoot.id, 'left'); |
| 366 | testJm.move_node(rightNode.id, '_last_', testRoot.id, 'right'); |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | // Test node_overflow option with new 'visible' value |
| 372 | function testNodeOverflowOptions() { |
no test coverage detected