test: fix tests

This commit is contained in:
Evan You 2019-12-14 22:28:39 -05:00
parent 2b178981bc
commit 75113c8d3e
3 changed files with 5 additions and 5 deletions

View File

@ -1514,7 +1514,7 @@ describe('compiler: parse', () => {
test('invalid html', () => {
expect(() => {
parse(`<div>\n<span>\n</div>\n</span>`)
}).toThrow('End tag was not found. (3:1)')
}).toThrow('End tag was not found.')
const spy = jest.fn()
const ast = parse(`<div>\n<span>\n</div>\n</span>`, {

View File

@ -380,7 +380,7 @@ describe('compiler: expression transform', () => {
const onError = jest.fn()
parseWithExpressionTransform(`{{ a( }}`, { onError })
expect(onError.mock.calls[0][0].message).toMatch(
`Invalid JavaScript expression. (1:4)`
`Invalid JavaScript expression.`
)
})
})

View File

@ -20,8 +20,8 @@ Object {
exports[`template errors 1`] = `
Array [
[SyntaxError: Invalid JavaScript expression. (2:13)],
[SyntaxError: v-bind is missing expression. (1:6)],
[SyntaxError: v-model can only be used on <input>, <textarea> and <select> elements. (2:17)],
[SyntaxError: Invalid JavaScript expression.],
[SyntaxError: v-bind is missing expression.],
[SyntaxError: v-model can only be used on <input>, <textarea> and <select> elements.],
]
`;