test(compiler-core): expect onError to be called (#976)
This commit is contained in:
parent
dd19db9c5d
commit
70c8c58be2
@ -30,11 +30,13 @@ describe('compiler: parse', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('simple text with invalid end tag', () => {
|
test('simple text with invalid end tag', () => {
|
||||||
|
const onError = jest.fn()
|
||||||
const ast = baseParse('some text</div>', {
|
const ast = baseParse('some text</div>', {
|
||||||
onError: () => {}
|
onError
|
||||||
})
|
})
|
||||||
const text = ast.children[0] as TextNode
|
const text = ast.children[0] as TextNode
|
||||||
|
|
||||||
|
expect(onError).toBeCalled()
|
||||||
expect(text).toStrictEqual({
|
expect(text).toStrictEqual({
|
||||||
type: NodeTypes.TEXT,
|
type: NodeTypes.TEXT,
|
||||||
content: 'some text',
|
content: 'some text',
|
||||||
|
Loading…
Reference in New Issue
Block a user