fix tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-06-21 22:22:47 -07:00
parent 99655d623e
commit a94f0191b5

View File

@ -317,7 +317,8 @@ describe('testing sketchOnExtrudedFace', () => {
|> line([8.62, -9.57], %)
|> close(%)
|> extrude(5 + 7, %)
const sketch001 = startSketchOn(part001, 'seg01')`)
const surface001 = startSketchOn(part001, 'seg01')
const sketch001 = surface001`)
})
test('it should be able to extrude on close segments', async () => {
const code = `const part001 = startSketchOn('-XZ')
@ -354,7 +355,8 @@ const sketch001 = startSketchOn(part001, 'seg01')`)
|> line([8.62, -9.57], %)
|> close(%, 'seg01')
|> extrude(5 + 7, %)
const sketch001 = startSketchOn(part001, 'seg01')`)
const surface001 = startSketchOn(part001, 'seg01')
const sketch001 = surface001`)
})
test('it should be able to extrude on start-end caps', async () => {
const code = `const part001 = startSketchOn('-XZ')
@ -392,7 +394,8 @@ const sketch001 = startSketchOn(part001, 'seg01')`)
|> line([8.62, -9.57], %)
|> close(%)
|> extrude(5 + 7, %)
const sketch001 = startSketchOn(part001, 'END')`)
const surface001 = startSketchOn(part001, 'END')
const sketch001 = surface001`)
})
test('it should ensure that the new sketch is inserted after the extrude', async () => {
const code = `const sketch001 = startSketchOn('-XZ')
@ -432,7 +435,8 @@ const sketch001 = startSketchOn(part001, 'END')`)
)
const newCode = recast(modifiedAst)
expect(newCode).toContain(`const part001 = extrude(5 + 7, sketch001)
const sketch002 = startSketchOn(part001, 'seg01')`)
const surface001 = startSketchOn(part001, 'seg01')
const sketch002 = surface001`)
})
})