mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-21 16:55:57 +00:00
test: update build benchmark
This commit is contained in:
parent
bbae4d74a4
commit
82ca08f933
@ -13,22 +13,21 @@ describe('build', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
bench('initial dev server build in the basic test fixture', async () => {
|
bench('initial dev server build in the basic test fixture', async () => {
|
||||||
const nuxt = await loadNuxt({
|
await new Promise((resolve) => {
|
||||||
cwd: basicTestFixtureDir,
|
loadNuxt({
|
||||||
ready: true,
|
cwd: basicTestFixtureDir,
|
||||||
overrides: {
|
ready: true,
|
||||||
dev: true,
|
overrides: {
|
||||||
buildDir: join(basicTestFixtureDir, 'node_modules/build/.nuxt'),
|
dev: true,
|
||||||
sourcemap: false,
|
buildDir: join(basicTestFixtureDir, 'node_modules/build/.nuxt'),
|
||||||
builder: {
|
sourcemap: false,
|
||||||
bundle: () => Promise.resolve(),
|
builder: {
|
||||||
|
async bundle (nuxt) {
|
||||||
|
resolve(await nuxt.close())
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
}).then(build)
|
||||||
})
|
})
|
||||||
await new Promise<void>((resolve) => {
|
|
||||||
nuxt.hook('build:done', () => resolve())
|
|
||||||
build(nuxt)
|
|
||||||
})
|
|
||||||
await nuxt.close()
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user