mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
21 lines
504 B
JavaScript
21 lines
504 B
JavaScript
import { NuxtCommand, commands } from '@nuxt/cli'
|
|
import consola from 'consola'
|
|
|
|
describe('cli generate', () => {
|
|
test('nuxt generate', async () => {
|
|
const generateCommand = await commands.default('generate')
|
|
|
|
const argv = [
|
|
__dirname,
|
|
'--no-force-exit',
|
|
'-c',
|
|
'cli.gen.config.js'
|
|
]
|
|
|
|
const cmd = new NuxtCommand(generateCommand, argv)
|
|
await expect(cmd.run()).resolves.toBeUndefined()
|
|
|
|
expect(consola.log).toBeCalledWith('Generated successfully')
|
|
})
|
|
})
|