Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 7, 2021
1 parent 249beb6 commit 7a93cd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server-renderer/__tests__/render.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1051,18 +1051,19 @@ function testRender(type: string, render: typeof renderToString) {
setup() {
onErrorCaptured(e => {
capturedError = e
return false
})
},
render() {
return h('div', h(Child))
}
})

try {
await render(app)
} catch (e) {
renderError = e
}
expect(`Unhandled error`).toHaveBeenWarned()
expect(renderError).toBe(null)
expect(((capturedError as unknown) as Error).message).toBe('An error')
})
Expand Down

0 comments on commit 7a93cd5

Please sign in to comment.