From 8749f4b71579037cf23c43df8dc9c9bf5c09a5cc Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 11 Mar 2020 15:11:39 +0530 Subject: [PATCH] chore: test case for command suggestion (#5228) --- packages/@vue/cli/__tests__/args.spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/@vue/cli/__tests__/args.spec.js diff --git a/packages/@vue/cli/__tests__/args.spec.js b/packages/@vue/cli/__tests__/args.spec.js new file mode 100644 index 0000000000..46532f1122 --- /dev/null +++ b/packages/@vue/cli/__tests__/args.spec.js @@ -0,0 +1,11 @@ +const path = require('path') +const execa = require('execa') + +const CLI_PATH = path.resolve(__dirname, '..', 'bin', 'vue.js') + +const runAsync = async args => await execa(CLI_PATH, args) + +test('suggests matching command', async () => { + const { stdout } = await runAsync(['confgi']) + expect(stdout).toContain('Did you mean config?') +})