From 9c384c69d23dc8cd9090d4b0bc7fba348944615a Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Sun, 1 Mar 2020 14:45:46 +0530 Subject: [PATCH] chore: test case for command suggestion --- 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?') +})