add array declarations

This commit is contained in:
Kurt Hutten IrevDev
2022-12-30 21:53:50 +11:00
parent f6c4250947
commit 3d6f5982c2
8 changed files with 253 additions and 3 deletions

View File

@ -180,6 +180,16 @@ show(mySketch)
// sourceRange: [77, 86],
// })
})
it('execute array expression', () => {
const code = ['const three = 3', "const yo = [1, '2', three, 4 + 5]"].join(
'\n'
)
const { root } = exe(code)
expect(root).toEqual({
three: 3,
yo: [1, '2', 3, 9],
})
})
})
// helpers