-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
const expr = compile("{a.type === 'dash' ? [2, 2] : [0, 0]}");
expect(expr({ type: 'line' })).toEqual([0, 0]);
expect(expr({ type: 'dash' })).toEqual([0, 0]);Throw error:
FAIL tests/case.test.ts > Some Integration Tests > should return valid value in lineDash
ExpressionError: Unexpected character: {
❯ tokenize src/tokenizer.ts:408:11
406|
407| // If we get here, we have an unexpected character
408| throw new ExpressionError(
| ^
409| `Unexpected character: ${input[pos]}`,
410| pos,
❯ compile src/compile.ts:19:18
❯ tests/case.test.ts:6:18
❯ node_modules/_@[email protected]@@vitest/runner/dist/chunk-hooks.js:155:11
BQXBQX
Metadata
Metadata
Assignees
Labels
No labels