From 78865d528e2f8f108a5bdd22cc16eb2080883bf4 Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Mon, 25 Nov 2024 10:53:37 -0800 Subject: [PATCH] revise error msg --- src/cucumber-runner.ts | 2 +- tests/unit/src/cucumber-runner.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cucumber-runner.ts b/src/cucumber-runner.ts index 2d3f096..d41d2ff 100644 --- a/src/cucumber-runner.ts +++ b/src/cucumber-runner.ts @@ -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". diff --git a/tests/unit/src/cucumber-runner.spec.js b/tests/unit/src/cucumber-runner.spec.js index e7b5f93..d744b9c 100644 --- a/tests/unit/src/cucumber-runner.spec.js +++ b/tests/unit/src/cucumber-runner.spec.js @@ -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', () => {