add member expression

This commit is contained in:
Kurt Hutten IrevDev
2023-01-03 19:41:27 +11:00
parent d2a4bb7851
commit a1f844b0b1
8 changed files with 415 additions and 4 deletions

View File

@ -206,6 +206,18 @@ show(mySketch)
},
})
})
it('execute memberExpression', () => {
const code = ["const yo = {a: {b: '123'}}", "const myVar = yo.a['b']"].join(
'\n'
)
const { root } = exe(code)
expect(root).toEqual({
yo: {
a: { b: '123' },
},
myVar: '123',
})
})
})
// helpers