(blocks: DeepnoteBlock[], type: string)
| 15 | } |
| 16 | |
| 17 | function findBlockByType(blocks: DeepnoteBlock[], type: string): DeepnoteBlock { |
| 18 | const block = blocks.find(b => b.type === type) |
| 19 | if (!block) { |
| 20 | throw new Error(`Block of type ${type} not found`) |
| 21 | } |
| 22 | return block |
| 23 | } |
| 24 | |
| 25 | describe('getBlockLabel', () => { |
| 26 | describe('code blocks', () => { |