Skip to content

Commit

Permalink
test(compiler-core): expect onError to be called (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 authored Apr 17, 2020
1 parent dd19db9 commit 70c8c58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/compiler-core/__tests__/parse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ describe('compiler: parse', () => {
})

test('simple text with invalid end tag', () => {
const onError = jest.fn()
const ast = baseParse('some text</div>', {
onError: () => {}
onError
})
const text = ast.children[0] as TextNode

expect(onError).toBeCalled()
expect(text).toStrictEqual({
type: NodeTypes.TEXT,
content: 'some text',
Expand Down

0 comments on commit 70c8c58

Please sign in to comment.