mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-28 08:45:31 +00:00
test: fix build.test
This commit is contained in:
parent
e4fe2409f5
commit
81c77bd111
@ -30,6 +30,8 @@ describe('build', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('generates on spa mode', async () => {
|
test('generates on spa mode', async () => {
|
||||||
|
const argv = process.argv
|
||||||
|
process.argv = ['', '', '--generate']
|
||||||
mockGetNuxt({
|
mockGetNuxt({
|
||||||
mode: 'spa',
|
mode: 'spa',
|
||||||
build: {
|
build: {
|
||||||
@ -42,6 +44,7 @@ describe('build', () => {
|
|||||||
|
|
||||||
expect(generate).toHaveBeenCalled()
|
expect(generate).toHaveBeenCalled()
|
||||||
expect(process.exit).toHaveBeenCalled()
|
expect(process.exit).toHaveBeenCalled()
|
||||||
|
process.argv = argv
|
||||||
})
|
})
|
||||||
|
|
||||||
test('catches error', async () => {
|
test('catches error', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user