2018-06-06 12:31:43 +00:00
|
|
|
import { exec } from 'child_process'
|
|
|
|
import { resolve } from 'path'
|
|
|
|
import { promisify } from 'util'
|
|
|
|
|
|
|
|
const execify = promisify(exec)
|
|
|
|
const rootDir = __dirname
|
2018-10-17 21:28:25 +00:00
|
|
|
const nuxtBin = resolve(__dirname, '../../../packages/cli/bin/nuxt.js')
|
2018-06-06 12:31:43 +00:00
|
|
|
|
2018-10-23 09:55:08 +00:00
|
|
|
describe.skip.appveyor('cli generate', () => {
|
2018-06-06 12:31:43 +00:00
|
|
|
test('nuxt generate', async () => {
|
2018-10-17 21:28:25 +00:00
|
|
|
const { stdout } = await execify(`node -r esm ${nuxtBin} generate ${rootDir} -c cli.gen.config.js`)
|
2018-06-06 12:31:43 +00:00
|
|
|
|
|
|
|
expect(stdout.includes('Generated successfully')).toBe(true)
|
|
|
|
}, 80000)
|
|
|
|
})
|