Nuxt/test/fixtures/cli/cli.build.test.js

21 lines
490 B
JavaScript
Raw Normal View History

import { NuxtCommand, commands } from '@nuxt/cli'
import consola from 'consola'
2018-10-25 11:33:07 +00:00
describe('cli build', () => {
test('nuxt build', async () => {
const buildCommand = await commands.default('build')
const argv = [
__dirname,
'--no-force-exit',
'-c',
'cli.build.config.js'
]
const cmd = new NuxtCommand(buildCommand, argv)
await expect(cmd.run()).resolves.toBeUndefined()
expect(consola.log).toBeCalledWith('Compiled successfully')
})
})