diff --git a/src/devtools/tests.ts b/src/devtools/tests.ts index 9dc6139..eba492e 100644 --- a/src/devtools/tests.ts +++ b/src/devtools/tests.ts @@ -3328,10 +3328,20 @@ export function registerAllTests(): void { expect(rt.buttonDisabled.b2).toBe(true) }) - test("script action warns that DSL isn't implemented yet", () => { + test('script action parses and dispatches sub-actions (no warn on valid DSL)', () => { const rt = makeMockRuntime() - evalAction({ type: 'script', source: 'play' }, rt) + evalAction({ type: 'script', source: 'play\npause' }, rt) + expect(rt.warnings.length).toBe(0) + expect(rt.calls).toEqual(['play', 'pause']) + }) + + test('script action warns per invalid DSL line', () => { + const rt = makeMockRuntime() + evalAction({ type: 'script', source: 'play\nwat\npause' }, rt) expect(rt.warnings.length).toBe(1) + expect(rt.warnings[0]).toContain('wat') + // Valid lines still fire. + expect(rt.calls).toEqual(['play', 'pause']) }) test('buildMarkerMap maps name → time', () => {