mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
ef7a42649d
nuxt-start and nuxt/legacy are also coming!
21 lines
564 B
JavaScript
21 lines
564 B
JavaScript
import { loadFixture, Nuxt, Builder } from './index'
|
|
|
|
export const buildFixture = function buildFixture(fixture) {
|
|
test(`Build ${fixture}`, async () => {
|
|
const config = loadFixture(fixture, {
|
|
test: true,
|
|
minimalCLI: true,
|
|
build: {
|
|
stats: false
|
|
}
|
|
})
|
|
const nuxt = new Nuxt(config)
|
|
const buildDone = jest.fn()
|
|
nuxt.hook('build:done', buildDone)
|
|
const builder = await new Builder(nuxt).build()
|
|
// 2: BUILD_DONE
|
|
expect(builder._buildStatus).toBe(2)
|
|
expect(buildDone).toHaveBeenCalledTimes(1)
|
|
})
|
|
}
|