fix tests

This commit is contained in:
Pooya Parsa 2017-06-16 03:08:43 +04:30
parent 644d19f7ec
commit 42b603304d
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ export default class Nuxt extends Tapable {
} }
}) })
this._ready = this.ready().catch(this.errorHandler) this._ready = this.ready()
} }
async ready () { async ready () {

View File

@ -14,9 +14,9 @@ test.serial('Nuxt.js Instance', async t => {
t.is(typeof nuxt, 'object') t.is(typeof nuxt, 'object')
t.is(nuxt.options.dev, true) t.is(nuxt.options.dev, true)
t.is(typeof nuxt.generate, 'function') t.is(typeof nuxt.generate, 'function')
t.is(typeof nuxt._init.then, 'function') t.is(typeof nuxt._ready.then, 'function')
await nuxt.ready() await nuxt.ready()
t.is(nuxt.readyialized, true) t.is(nuxt.initialized, true)
}) })
test.serial('Fail to build when no pages/ directory but is in the parent', t => { test.serial('Fail to build when no pages/ directory but is in the parent', t => {