( type: string, text: string, children: Node[] = [], )
| 6 | import type { Node } from './parser.js' |
| 7 | |
| 8 | function makeNode( |
| 9 | type: string, |
| 10 | text: string, |
| 11 | children: Node[] = [], |
| 12 | ): Node { |
| 13 | return { |
| 14 | type, |
| 15 | text, |
| 16 | startIndex: 0, |
| 17 | endIndex: text.length, |
| 18 | children, |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | describe('extractCommandArguments', () => { |
| 23 | it('extracts command name and arguments from a simple command', () => { |