Skip to content

Commit

Permalink
tests: add test case for flag suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Nov 1, 2020
1 parent 641e4ea commit fd8fef0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unknown/unknown.test.js
Expand Up @@ -6,4 +6,9 @@ describe('unknown behaviour', () => {
expect(stderr).toBeTruthy();
expect(stderr).toContain('Unknown argument: --unknown');
});
it('suggests the closest match to an unknown flag', () => {
const { stderr, stdout } = run(__dirname, ['--entyr', './a.js']);
expect(stderr).toContain('[webpack-cli] Unknown argument: --entyr');
expect(stdout).toContain('Did you mean --entry?');
});
});

0 comments on commit fd8fef0

Please sign in to comment.