Skip to content

Commit 70c8c58

Browse files
authored
test(compiler-core): expect onError to be called (#976)
1 parent dd19db9 commit 70c8c58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/compiler-core/__tests__/parse.spec.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ describe('compiler: parse', () => {
3030
})
3131

3232
test('simple text with invalid end tag', () => {
33+
const onError = jest.fn()
3334
const ast = baseParse('some text</div>', {
34-
onError: () => {}
35+
onError
3536
})
3637
const text = ast.children[0] as TextNode
3738

39+
expect(onError).toBeCalled()
3840
expect(text).toStrictEqual({
3941
type: NodeTypes.TEXT,
4042
content: 'some text',

0 commit comments

Comments
 (0)