Skip to content

Commit 1e6382f

Browse files
committed
feat: change attempt separator to _
resolves #196 Signed-off-by: Jakub Freisler <[email protected]>
1 parent 3c2c2c4 commit 1e6382f

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed

src/screenshotPath.utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ export const generateScreenshotPath = ({
6666

6767
return path.join(
6868
IMAGE_SNAPSHOT_PREFIX,
69-
`${screenshotPath} #${nameCacheCounter[screenshotPath]}${FILE_SUFFIX.actual}.png`
69+
`${screenshotPath}_#${nameCacheCounter[screenshotPath]}${FILE_SUFFIX.actual}.png`
7070
);
7171
};
7272

7373
const screenshotPathRegex = new RegExp(
74-
`^([\\s\\S]+?) #([0-9]+)(?:(?:\\${FILE_SUFFIX.diff})|(?:\\${FILE_SUFFIX.actual}))?\\.(?:png|PNG)$`
74+
`^([\\s\\S]+?)_#([0-9]+)(?:(?:\\${FILE_SUFFIX.diff})|(?:\\${FILE_SUFFIX.actual}))?\\.(?:png|PNG)$`
7575
);
7676
export const wasScreenshotUsed = (imagePath: string) => {
7777
const matched = imagePath.match(screenshotPathRegex);

0 commit comments

Comments
 (0)