mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
test:build in test env
This commit is contained in:
parent
b0ddccb3de
commit
c8ced350b8
@ -13,6 +13,7 @@ let page = null
|
||||
// Init nuxt.js and create server listening on localhost:4003
|
||||
test.serial('Init Nuxt.js', async (t) => {
|
||||
const options = {
|
||||
test: true,
|
||||
rootDir: resolve(__dirname, 'fixtures/basic'),
|
||||
buildDir: '.nuxt-csr',
|
||||
dev: true,
|
||||
|
@ -9,6 +9,7 @@ let transpile = null
|
||||
describe('basic dev', () => {
|
||||
beforeAll(async () => {
|
||||
const config = loadFixture('basic', {
|
||||
test: true,
|
||||
dev: true,
|
||||
debug: true,
|
||||
buildDir: '.nuxt-dev',
|
||||
|
@ -7,7 +7,7 @@ describe('nuxt', () => {
|
||||
})
|
||||
|
||||
test('Nuxt.js Instance', async () => {
|
||||
const config = loadFixture('empty')
|
||||
const config = loadFixture('empty', { test: true })
|
||||
const nuxt = new Nuxt(config)
|
||||
|
||||
expect(typeof nuxt).toBe('object')
|
||||
@ -33,7 +33,7 @@ describe('nuxt', () => {
|
||||
})
|
||||
|
||||
test('Build with default page when no pages/ directory', async () => {
|
||||
const nuxt = new Nuxt()
|
||||
const nuxt = new Nuxt({ test: true })
|
||||
new Builder(nuxt).build()
|
||||
const port = await getPort()
|
||||
await nuxt.listen(port, 'localhost')
|
||||
@ -46,6 +46,7 @@ describe('nuxt', () => {
|
||||
|
||||
test('Fail to build when specified plugin isn\'t found', () => {
|
||||
const nuxt = new Nuxt({
|
||||
test: true,
|
||||
dev: false,
|
||||
rootDir: resolve(__dirname, '..', 'fixtures', 'missing-plugin')
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user