Skip to content

Commit

Permalink
revise error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 committed Nov 25, 2024
1 parent d06c514 commit 78865d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cucumber-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function normalizeFormat(format: string, assetDir: string): string {
// Restrict users from using this format.
if (format.startsWith('file://')) {
throw new Error(
`Invalid format setting detected. The provided format "${format}" is not allowed.`,
`Ambiguous colon usage detected. The provided format "${format}" is not allowed.`,
);
}
// Try to match structured inputs in the format key:value, "key:value", or "key":"value".
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/cucumber-runner.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('normalizeFormat', () => {
it('should throw an error for an invalid file path type', () => {
expect(() => {
normalizeFormat(`file://formatter/implementation:report.json`, assetDir);
}).toThrow('Invalid format setting detected');
}).toThrow('Ambiguous colon usage detected');
});

it('should return simple strings as-is', () => {
Expand Down

0 comments on commit 78865d5

Please sign in to comment.