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) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-20 22:04:52 +02:00
1 parent 22b553e931
commit d0ea7e54ee
1 file changed
+12 -2
+12 -2
View File
@@ -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', () => {