Skip to content

Commit

Permalink
fix dashed arg support tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Hargrove committed Dec 12, 2018
1 parent a9999f6 commit ec9ba73
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions e2e/__tests__/supports-dashed-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,27 @@ test('works with passing tests', () => {
'--collect-coverage',
'--coverageReporters',
'text-summary',
'--detect-open-handles',
'--clear-mocks',
'--useStderr',
]);
if (result.status !== 0) {
console.error(result.stderr);
}
expect(result.status).toBe(0);
});

test('throws error for unknown dashed & camelcase args', () => {
const result = runJest(consoleDir, [
'success.test.js',
'--runInBand',
'--collect-coverage',
'--coverageReporters',
'text-summary',
'--clear-mocks',
'--doesNotExist',
'--also-does-not-exist',
'--useStderr',
]);
expect(result.status).toBe(1);
expect(result.stderr).toMatchInlineSnapshot(`
● Unrecognized CLI Parameters:
Expand All @@ -49,4 +59,5 @@ test('throws error for unknown dashed & camelcase args', () => {
`);
expect(result.status).toBe(1);
});

0 comments on commit ec9ba73

Please sign in to comment.