Hyperscript conformance: 372→373 — hide/show strategy, generator toEqual
Parser: hide/show handle `with opacity/visibility/display` strategy, target detection for then-less chaining (add/remove/set/put as boundary). Generator: inline run().toEqual([...]) pattern for eval-only tests. Compiler: hide/show emit correct CSS property per strategy. 373/831 (45%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -596,6 +596,15 @@ def generate_eval_only_test(test, idx):
|
||||
expected_sx = js_val_to_sx(m.group(3))
|
||||
assertions.append(f' (assert= {expected_sx} (eval-hs "{hs_expr}"))')
|
||||
|
||||
# Pattern 1b: Inline — run("expr").toEqual([...])
|
||||
for m in re.finditer(
|
||||
r'(?:expect\()?(?:await\s+)?run\((["\x27`])(.+?)\1\)\)?\.toEqual\((\[.*?\])\)',
|
||||
body, re.DOTALL
|
||||
):
|
||||
hs_expr = extract_hs_expr(m.group(2))
|
||||
expected_sx = js_val_to_sx(m.group(3))
|
||||
assertions.append(f' (assert= {expected_sx} (eval-hs "{hs_expr}"))')
|
||||
|
||||
# Pattern 2: Two-line — var result = await run(`expr`); expect(result).toBe(val)
|
||||
if not assertions:
|
||||
run_match = re.search(
|
||||
|
||||
Reference in New Issue
Block a user