chore: update error tests

This commit is contained in:
Pooya Parsa 2021-06-02 16:58:25 +02:00
parent 83547fc4ec
commit d4e5998f93
2 changed files with 4 additions and 6 deletions

View File

@ -155,9 +155,8 @@ describe('basic dev', () => {
}) })
test('/error should return error stack trace (Youch)', async () => { test('/error should return error stack trace (Youch)', async () => {
await expect(nuxt.server.renderAndGetWindow(url('/error'))).rejects.toMatchObject({ await expect(nuxt.server.renderAndGetWindow(url('/error')))
response: { statusCode: 500 } .rejects.toThrow('Resource was not loaded. Status: 500')
})
}) })
test('/error should return json format error (Youch)', async () => { test('/error should return json format error (Youch)', async () => {

View File

@ -32,9 +32,8 @@ describe('error', () => {
}) })
test('/ with renderAndGetWindow()', async () => { test('/ with renderAndGetWindow()', async () => {
await expect(nuxt.server.renderAndGetWindow(url('/error'))).rejects.toMatchObject({ await expect(nuxt.server.renderAndGetWindow(url('/error')))
statusCode: 500 .rejects.toThrow('Resource was not loaded. Status: 500')
})
}) })
test('Error: resolvePath()', () => { test('Error: resolvePath()', () => {