Skip to content

Commit 7e78edf

Browse files
committed
Fix playwright
1 parent 864c2ea commit 7e78edf

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,17 +375,16 @@ <h1><a href="https://github.com/dy/subscript" class="logo-link" target="_blank"
375375
'number', 'string',
376376
// Operators - order matters for token chain
377377
'assign', 'logical', 'bit', 'cmp', 'equality', 'arithmetic', 'increment',
378-
// Control flow foundations (needed by group via loop)
379-
'loop',
380378
// Expression features
381-
'seq', 'group', 'access',
379+
'seq', 'access',
382380
// Justin additions
383381
'comment', 'identity', 'nullish', 'pow', 'unary',
384382
'literal', 'ternary', 'arrow', 'spread', 'optional',
385383
'accessor', 'collection', 'template', 'regex', 'unit',
386-
// Jessie additions
387-
'var', 'function', 'async', 'class',
388-
'if', 'try', 'switch', 'module', 'asi'
384+
// Jessie additions - dependency order: if → loop/function/try/class/switch, arrow/var → loop, loop → try/switch
385+
'var', 'if', 'loop', 'group',
386+
'function', 'async', 'class',
387+
'try', 'switch', 'module', 'asi'
389388
]
390389

391390
// UI feature groups (maps to internal IDs)

playwright.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ export default defineConfig({
1515
projects: [
1616
{ name: 'chromium', use: { browserName: 'chromium' } },
1717
],
18+
webServer: {
19+
command: 'npx serve -l 8765 --no-clipboard',
20+
port: 8765,
21+
reuseExistingServer: true,
22+
},
1823
})

test/index.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ test.describe('Subscript REPL', () => {
269269
const input = page.locator('#input')
270270
const error = page.locator('#error')
271271

272-
// 'const' requires var feature (jessie preset)
273-
await input.fill('const x = 1')
272+
// '#' is not a valid token in any preset
273+
await input.fill('#invalid')
274274
await expect(error).toContainText('Unexpected', { timeout: 2000 })
275275

276276
// Error should show position indicator

0 commit comments

Comments
 (0)