mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
test: normalize test title
This commit is contained in:
parent
cbd73463f8
commit
7d2ea44c83
@ -20,17 +20,17 @@ test.before('Init Nuxt.js', async t => {
|
|||||||
await nuxt.listen(port, 'localhost')
|
await nuxt.listen(port, 'localhost')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Check /test/_open (open-in-editor)', async t => {
|
test('/test/_open (open-in-editor)', async t => {
|
||||||
const { body } = await rp(url('/test/_open?file=pages/index.vue'), { resolveWithFullResponse: true })
|
const { body } = await rp(url('/test/_open?file=pages/index.vue'), { resolveWithFullResponse: true })
|
||||||
t.is(body, 'opened in editor!')
|
t.is(body, 'opened in editor!')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Check /test/_open with error (open-in-editor)', async t => {
|
test('/test/_open should return error (open-in-editor)', async t => {
|
||||||
const { body } = await rp(url('/test/_open?file='), { resolveWithFullResponse: true })
|
const { body } = await rp(url('/test/_open?file='), { resolveWithFullResponse: true })
|
||||||
t.is(body, 'File is not specified')
|
t.is(body, 'File is not specified')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Check /test/error (Youch)', async t => {
|
test('/test/error should return error stack trace (Youch)', async t => {
|
||||||
const { response, error } = await t.throws(nuxt.renderAndGetWindow(url('/test/error')))
|
const { response, error } = await t.throws(nuxt.renderAndGetWindow(url('/test/error')))
|
||||||
t.is(response.statusCode, 500)
|
t.is(response.statusCode, 500)
|
||||||
t.is(response.statusMessage, 'NuxtServerError')
|
t.is(response.statusMessage, 'NuxtServerError')
|
||||||
|
Loading…
Reference in New Issue
Block a user