test: normalize test title

This commit is contained in:
Clark Du 2017-10-30 11:40:31 +08:00
parent cbd73463f8
commit 7d2ea44c83
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
1 changed files with 3 additions and 3 deletions

View File

@ -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')