Add the unexpected token to the error message (#3430)
* Add the unexpected token to the error message This is helpful during development where there's nothing to point at the character index. * Update more tests
This commit is contained in:
@ -2026,7 +2026,7 @@ describe('parsing errors', () => {
|
||||
expect(result).toBeInstanceOf(KCLError)
|
||||
const error = result as KCLError
|
||||
expect(error.kind).toBe('syntax')
|
||||
expect(error.msg).toBe('Unexpected token')
|
||||
expect(error.msg).toBe('Unexpected token: (')
|
||||
expect(error.sourceRanges).toEqual([[27, 28]])
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user