diff --git a/test/debug.test.js b/test/debug.test.js index f9d2d5ba23..d19ebe955d 100644 --- a/test/debug.test.js +++ b/test/debug.test.js @@ -30,6 +30,14 @@ test('Check /test/_open with error (open-in-editor)', async t => { t.is(body, 'File is not specified') }) +test('Check /test/error (Youch)', async t => { + const { response, error } = await t.throws(nuxt.renderAndGetWindow(url('/test/error'))) + t.is(response.statusCode, 500) + t.is(response.statusMessage, 'NuxtServerError') + t.true(error.includes('test youch !')) + t.true(error.includes('
')) +}) + // Close server and ask nuxt to stop listening to file changes test.after('Closing server and nuxt.js', t => { nuxt.close() diff --git a/test/fixtures/debug/pages/error.vue b/test/fixtures/debug/pages/error.vue new file mode 100644 index 0000000000..ed9d681ade --- /dev/null +++ b/test/fixtures/debug/pages/error.vue @@ -0,0 +1,12 @@ + + +