Fix std unit tests

This commit is contained in:
Jonathan Tran
2025-04-14 14:02:26 -04:00
parent 73d7d93a3d
commit 255b88de4f

View File

@ -12,11 +12,12 @@ describe('testing angledLineThatIntersects', () => {
|> startProfileAt([0, 0], %) |> startProfileAt([0, 0], %)
|> line(endAbsolute = [2, 2], tag = $yo) |> line(endAbsolute = [2, 2], tag = $yo)
|> line(endAbsolute = [3, 1]) |> line(endAbsolute = [3, 1])
|> angledLineThatIntersects({ |> angledLineThatIntersects(
angle: 180, angle = 180,
intersectTag: yo, intersectTag = yo,
offset: ${offset}, offset = ${offset},
}, %, $yo2) tag = $yo2,
)
intersect = segEndX(yo2)` intersect = segEndX(yo2)`
const execState = await enginelessExecutor(assertParse(code('-1'))) const execState = await enginelessExecutor(assertParse(code('-1')))
expect(execState.variables['intersect']?.value).toBe(1 + Math.sqrt(2)) expect(execState.variables['intersect']?.value).toBe(1 + Math.sqrt(2))