From d0ea7e54ee8b749b257a77871bc1167d2993d9b7 Mon Sep 17 00:00:00 2001 From: th Date: Mon, 20 Apr 2026 22:04:52 +0200 Subject: [PATCH] tests: replace the stale DSL-not-implemented-yet warn test The test was written in slice 5 when evalAction for type:'script' was a warn stub. Slice 8 wired it up to the actual parser, so the original assertion (1 warning) no longer holds. Replaces it with two tests: valid DSL source fires the parsed sub-actions without warnings, and invalid lines surface a warning without blocking the valid ones. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/devtools/tests.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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', () => {