Skip to content

Commit ea23c2a

Browse files
authored
Merge pull request #135 from joomcode/fix/screenshot-filenames
fix: encoding screenshot filenames
2 parents 3346c93 + 93d9a63 commit ea23c2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/test/getScreenshotFileNames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const getScreenshotFileNames = async (
2323
const directoryPath = join(SCREENSHOTS_DIRECTORY_PATH, directoryName);
2424
const alreadyExistingScreenshots = await readdir(directoryPath).catch((): string[] => []);
2525

26-
const fileNamePrefix = `${testStaticOptions.name}.`.replace(/"/g, '');
26+
const fileNamePrefix = `${testStaticOptions.name}.`.replace(/[^a-zA-Z0-9\-._~]/g, '_');
2727

2828
const currentFullPageScreenshotsIndex = Math.max(
2929
0,

0 commit comments

Comments
 (0)