From bdb5332ef8fc941968dcfcb29257b193f88134e6 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Fri, 17 Jan 2025 11:59:51 -0500 Subject: [PATCH] Fix to not call WASM function before beforeAll callback is run --- src/lang/std/sketch.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/std/sketch.test.ts b/src/lang/std/sketch.test.ts index 9ce2f74a23..5c631666d4 100644 --- a/src/lang/std/sketch.test.ts +++ b/src/lang/std/sketch.test.ts @@ -358,7 +358,6 @@ describe('testing getConstraintInfo', () => { offset = 0 }, %) |> tangentialArcTo([3.14, 13.14], %)` - const ast = assertParse(code) test.each([ [ 'line', @@ -681,6 +680,7 @@ describe('testing getConstraintInfo', () => { ], ], ])('testing %s when inputs are unconstrained', (functionName, expected) => { + const ast = assertParse(code) const sourceRange = topLevelRange( code.indexOf(functionName), code.indexOf(functionName) + functionName.length @@ -717,7 +717,6 @@ describe('testing getConstraintInfo', () => { offset = 0 }, %) |> tangentialArcTo([3.14, 13.14], %)` - const ast = assertParse(code) test.each([ [ `angledLine(`, @@ -835,6 +834,7 @@ describe('testing getConstraintInfo', () => { ], ], ])('testing %s when inputs are unconstrained', (functionName, expected) => { + const ast = assertParse(code) const sourceRange = topLevelRange( code.indexOf(functionName), code.indexOf(functionName) + functionName.length @@ -871,7 +871,6 @@ describe('testing getConstraintInfo', () => { offset = 0 + 0 }, %) |> tangentialArcTo([3.14 + 0, 13.14 + 0], %)` - const ast = assertParse(code) test.each([ [ 'line', @@ -1191,6 +1190,7 @@ describe('testing getConstraintInfo', () => { ], ], ])('testing %s when inputs are unconstrained', (functionName, expected) => { + const ast = assertParse(code) const sourceRange = topLevelRange( code.indexOf(functionName), code.indexOf(functionName) + functionName.length