mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-19 16:01:24 +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 () => {
|
||||
const nuxt = await loadNuxt({
|
||||
cwd: basicTestFixtureDir,
|
||||
ready: true,
|
||||
overrides: {
|
||||
dev: true,
|
||||
buildDir: join(basicTestFixtureDir, 'node_modules/build/.nuxt'),
|
||||
sourcemap: false,
|
||||
builder: {
|
||||
bundle: () => Promise.resolve(),
|
||||
await new Promise((resolve) => {
|
||||
loadNuxt({
|
||||
cwd: basicTestFixtureDir,
|
||||
ready: true,
|
||||
overrides: {
|
||||
dev: true,
|
||||
buildDir: join(basicTestFixtureDir, 'node_modules/build/.nuxt'),
|
||||
sourcemap: false,
|
||||
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