chore: update tests

This commit is contained in:
Pooya Parsa 2017-07-22 23:49:35 +04:30
parent b16060afd4
commit 68326a6c9b
10 changed files with 5 additions and 16 deletions

View File

@ -6,7 +6,6 @@ test('Fail with routes() which throw an error', async t => {
const options = {
rootDir: resolve(__dirname, 'fixtures/basic'),
dev: false,
runBuild: true,
generate: {
async routes () {
throw new Error('Not today!')

View File

@ -18,7 +18,6 @@ test.before('Init Nuxt.js', async t => {
let config = require(resolve(rootDir, 'nuxt.config.js'))
config.rootDir = rootDir
config.dev = false
config.runBuild = true
nuxt = new Nuxt(config)
const builder = new Builder(nuxt)
const generator = new Generator(nuxt, builder)

View File

@ -13,8 +13,7 @@ let nuxt = null
test.before('Init Nuxt.js', async t => {
const options = {
rootDir: resolve(__dirname, 'fixtures/basic'),
dev: false,
runBuild: true
dev: false
}
nuxt = new Nuxt(options)
await new Builder(nuxt).build()

View File

@ -11,8 +11,7 @@ let nuxt = null
test.before('Init Nuxt.js', async t => {
const options = {
rootDir: resolve(__dirname, 'fixtures/children'),
dev: false,
runBuild: true
dev: false
}
nuxt = new Nuxt(options)
await new Builder(nuxt).build()

View File

@ -9,8 +9,7 @@ const readFile = pify(fs.readFile)
test.before('Init Nuxt.js', async t => {
const nuxt = new Nuxt({
rootDir: resolve(__dirname, 'fixtures/dynamic-routes'),
dev: false,
runBuild: true
dev: false
})
await new Builder(nuxt).build()
})

View File

@ -11,8 +11,7 @@ let nuxt = null
test.before('Init Nuxt.js', async t => {
const options = {
rootDir: resolve(__dirname, 'fixtures/error'),
dev: false,
runBuild: true
dev: false
}
nuxt = new Nuxt(options)
await new Builder(nuxt).build()

View File

@ -14,8 +14,7 @@ let app
test.before('Init Nuxt.js', async t => {
const options = {
rootDir: resolve(__dirname, 'fixtures/basic'),
dev: false,
runBuild: true
dev: false
}
// Create nuxt instace

View File

@ -20,7 +20,6 @@ test.serial('Nuxt.js Instance', async t => {
test.serial('Fail to build when no pages/ directory but is in the parent', t => {
const nuxt = new Nuxt({
dev: false,
runBuild: true,
rootDir: resolve(__dirname, 'fixtures', 'empty', 'pages')
})
return new Builder(nuxt).build().catch(err => {
@ -33,7 +32,6 @@ test.serial('Fail to build when no pages/ directory but is in the parent', t =>
test.serial('Fail to build when no pages/ directory', t => {
const nuxt = new Nuxt({
dev: false,
runBuild: true,
rootDir: resolve(__dirname)
})
return new Builder(nuxt).build().catch(err => {

View File

@ -14,7 +14,6 @@ test.before('Init Nuxt.js', async t => {
let config = require(resolve(rootDir, 'nuxt.config.js'))
config.rootDir = rootDir
config.dev = false
config.runBuild = true
nuxt = new Nuxt(config)
await new Builder(nuxt).build()

View File

@ -14,7 +14,6 @@ test.before('Init Nuxt.js', async t => {
let config = require(resolve(rootDir, 'nuxt.config.js'))
config.rootDir = rootDir
config.dev = false
config.runBuild = true
nuxt = new Nuxt(config)
await new Builder(nuxt).build()