Skip to content

Commit

Permalink
no file uri support in path
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 committed Nov 22, 2024
1 parent 783703d commit ffb8742
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions src/cucumber-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ export function normalizeFormat(format: string, assetDir: string): string {
key = key.replaceAll('"', '');
value = value.replaceAll('"', '');

if (value.startsWith('file://')) {
return `"${key}":"${value}"`;
}

return `"${key}":"${path.join(assetDir, value)}"`;
}

Expand Down
12 changes: 0 additions & 12 deletions tests/unit/src/cucumber-runner.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ describe('normalizeFormat', () => {
);
});

it('should normalize formats with absolute path', () => {
expect(
normalizeFormat(`"html":"file:///tmp/formatter/report.html"`, assetDir),
).toBe(`"html":"file:///tmp/formatter/report.html"`);
expect(
normalizeFormat(`"html:file:///tmp/formatter/report.html"`, assetDir),
).toBe(`"html":"file:///tmp/formatter/report.html"`);
expect(
normalizeFormat(`html:file:///tmp/formatter/report.html`, assetDir),
).toBe(`"html":"file:///tmp/formatter/report.html"`);
});

it('should normalize format with file path type', () => {
expect(
normalizeFormat(
Expand Down

0 comments on commit ffb8742

Please sign in to comment.