Files
rose-ash/tests/playwright
giles dc194b05eb HS test generator: pair each expect(result) with the matching run() — +4 asExpression
Pattern 2 was binding all `expect(result)` assertions in a body to the
*first* `run()`, even when the body re-assigned `result` between checks:

  let result = await run("'10' as Float")    expect(result).toBe(10)
  result = await run("'10.4' as Float")      expect(result).toBe(10.4)

Both assertions ran against `'10' as Float`, so half failed. Now the
generator walks `run()` calls in order, parses per-call `{locals: {...}}`
opts (balanced-brace, with the closing `\)` anchoring the lazy quote
match), and pairs each `expect(result)` with the most recent preceding
run.

asExpression 15/42 → 19/42 (+4: as Float / Number / String / Fixed sub-
assertions now check the right expression). Other suites unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 11:22:53 +00:00
..