Files
vue-cli/packages/@vue/cli/__tests__/args.spec.js
2021-10-09 23:43:26 +08:00

15 lines
429 B
JavaScript

const path = require('path')
const { execa } = require('@vue/cli-shared-utils')
const CLI_PATH = path.resolve(__dirname, '..', 'bin', 'vue.js')
const runAsync = (args, options) => execa(CLI_PATH, args, options)
test('suggests matching command', async () => {
const { code, stdout } = await runAsync(['confgi'], { reject: false })
// Assertions
expect(code).toBe(1)
expect(stdout).toContain('Did you mean config?')
})