mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-29 23:02:42 +00:00
chore: update tests
This commit is contained in:
parent
b16060afd4
commit
68326a6c9b
@ -6,7 +6,6 @@ test('Fail with routes() which throw an error', async t => {
|
|||||||
const options = {
|
const options = {
|
||||||
rootDir: resolve(__dirname, 'fixtures/basic'),
|
rootDir: resolve(__dirname, 'fixtures/basic'),
|
||||||
dev: false,
|
dev: false,
|
||||||
runBuild: true,
|
|
||||||
generate: {
|
generate: {
|
||||||
async routes () {
|
async routes () {
|
||||||
throw new Error('Not today!')
|
throw new Error('Not today!')
|
||||||
|
@ -18,7 +18,6 @@ test.before('Init Nuxt.js', async t => {
|
|||||||
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
||||||
config.rootDir = rootDir
|
config.rootDir = rootDir
|
||||||
config.dev = false
|
config.dev = false
|
||||||
config.runBuild = true
|
|
||||||
nuxt = new Nuxt(config)
|
nuxt = new Nuxt(config)
|
||||||
const builder = new Builder(nuxt)
|
const builder = new Builder(nuxt)
|
||||||
const generator = new Generator(nuxt, builder)
|
const generator = new Generator(nuxt, builder)
|
||||||
|
@ -13,8 +13,7 @@ let nuxt = null
|
|||||||
test.before('Init Nuxt.js', async t => {
|
test.before('Init Nuxt.js', async t => {
|
||||||
const options = {
|
const options = {
|
||||||
rootDir: resolve(__dirname, 'fixtures/basic'),
|
rootDir: resolve(__dirname, 'fixtures/basic'),
|
||||||
dev: false,
|
dev: false
|
||||||
runBuild: true
|
|
||||||
}
|
}
|
||||||
nuxt = new Nuxt(options)
|
nuxt = new Nuxt(options)
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
|
@ -11,8 +11,7 @@ let nuxt = null
|
|||||||
test.before('Init Nuxt.js', async t => {
|
test.before('Init Nuxt.js', async t => {
|
||||||
const options = {
|
const options = {
|
||||||
rootDir: resolve(__dirname, 'fixtures/children'),
|
rootDir: resolve(__dirname, 'fixtures/children'),
|
||||||
dev: false,
|
dev: false
|
||||||
runBuild: true
|
|
||||||
}
|
}
|
||||||
nuxt = new Nuxt(options)
|
nuxt = new Nuxt(options)
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
|
@ -9,8 +9,7 @@ const readFile = pify(fs.readFile)
|
|||||||
test.before('Init Nuxt.js', async t => {
|
test.before('Init Nuxt.js', async t => {
|
||||||
const nuxt = new Nuxt({
|
const nuxt = new Nuxt({
|
||||||
rootDir: resolve(__dirname, 'fixtures/dynamic-routes'),
|
rootDir: resolve(__dirname, 'fixtures/dynamic-routes'),
|
||||||
dev: false,
|
dev: false
|
||||||
runBuild: true
|
|
||||||
})
|
})
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
})
|
})
|
||||||
|
@ -11,8 +11,7 @@ let nuxt = null
|
|||||||
test.before('Init Nuxt.js', async t => {
|
test.before('Init Nuxt.js', async t => {
|
||||||
const options = {
|
const options = {
|
||||||
rootDir: resolve(__dirname, 'fixtures/error'),
|
rootDir: resolve(__dirname, 'fixtures/error'),
|
||||||
dev: false,
|
dev: false
|
||||||
runBuild: true
|
|
||||||
}
|
}
|
||||||
nuxt = new Nuxt(options)
|
nuxt = new Nuxt(options)
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
|
@ -14,8 +14,7 @@ let app
|
|||||||
test.before('Init Nuxt.js', async t => {
|
test.before('Init Nuxt.js', async t => {
|
||||||
const options = {
|
const options = {
|
||||||
rootDir: resolve(__dirname, 'fixtures/basic'),
|
rootDir: resolve(__dirname, 'fixtures/basic'),
|
||||||
dev: false,
|
dev: false
|
||||||
runBuild: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create nuxt instace
|
// Create nuxt instace
|
||||||
|
@ -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 => {
|
test.serial('Fail to build when no pages/ directory but is in the parent', t => {
|
||||||
const nuxt = new Nuxt({
|
const nuxt = new Nuxt({
|
||||||
dev: false,
|
dev: false,
|
||||||
runBuild: true,
|
|
||||||
rootDir: resolve(__dirname, 'fixtures', 'empty', 'pages')
|
rootDir: resolve(__dirname, 'fixtures', 'empty', 'pages')
|
||||||
})
|
})
|
||||||
return new Builder(nuxt).build().catch(err => {
|
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 => {
|
test.serial('Fail to build when no pages/ directory', t => {
|
||||||
const nuxt = new Nuxt({
|
const nuxt = new Nuxt({
|
||||||
dev: false,
|
dev: false,
|
||||||
runBuild: true,
|
|
||||||
rootDir: resolve(__dirname)
|
rootDir: resolve(__dirname)
|
||||||
})
|
})
|
||||||
return new Builder(nuxt).build().catch(err => {
|
return new Builder(nuxt).build().catch(err => {
|
||||||
|
@ -14,7 +14,6 @@ test.before('Init Nuxt.js', async t => {
|
|||||||
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
||||||
config.rootDir = rootDir
|
config.rootDir = rootDir
|
||||||
config.dev = false
|
config.dev = false
|
||||||
config.runBuild = true
|
|
||||||
nuxt = new Nuxt(config)
|
nuxt = new Nuxt(config)
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ test.before('Init Nuxt.js', async t => {
|
|||||||
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
let config = require(resolve(rootDir, 'nuxt.config.js'))
|
||||||
config.rootDir = rootDir
|
config.rootDir = rootDir
|
||||||
config.dev = false
|
config.dev = false
|
||||||
config.runBuild = true
|
|
||||||
nuxt = new Nuxt(config)
|
nuxt = new Nuxt(config)
|
||||||
await new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user