test: fix build.test

This commit is contained in:
Clark Du 2018-11-09 16:48:28 +00:00
parent e4fe2409f5
commit 81c77bd111

View File

@ -30,6 +30,8 @@ describe('build', () => {
})
test('generates on spa mode', async () => {
const argv = process.argv
process.argv = ['', '', '--generate']
mockGetNuxt({
mode: 'spa',
build: {
@ -42,6 +44,7 @@ describe('build', () => {
expect(generate).toHaveBeenCalled()
expect(process.exit).toHaveBeenCalled()
process.argv = argv
})
test('catches error', async () => {