Support paths to names rather than just raw idents (#5778)
* Support paths to names rather than just raw idents Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -72,8 +72,8 @@ describe('Testing createCallExpression', () => {
|
||||
it('should create a call expression', () => {
|
||||
const result = createCallExpression('myFunc', [createLiteral(5)])
|
||||
expect(result.type).toBe('CallExpression')
|
||||
expect(result.callee.type).toBe('Identifier')
|
||||
expect(result.callee.name).toBe('myFunc')
|
||||
expect(result.callee.type).toBe('Name')
|
||||
expect(result.callee.name.name).toBe('myFunc')
|
||||
expect(result.arguments[0].type).toBe('Literal')
|
||||
expect((result.arguments[0] as any).value.value).toBe(5)
|
||||
})
|
||||
|
Reference in New Issue
Block a user