Skip to content

Commit e677789

Browse files
committed
feat: persist/restore state
1 parent b505989 commit e677789

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "regressify",
3-
"version": "1.2.27",
3+
"version": "1.2.28",
44
"description": "Visual regression tests support",
55
"main": "src/index.ts",
66
"type": "module",

src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function getConfig(args: string[]): Config {
197197
browser: data?.browser ?? 'chromium',
198198
ignoreHTTPSErrors: data && typeof data?.ignoreSslErrors === 'boolean' ? data.ignoreSslErrors : true,
199199
headless: data?.debug ? undefined : 'new',
200-
storageState: data?.state ? getStatePath(data.state) : undefined,
200+
storageState: data?.state && fs.existsSync(getStatePath(data.state)) ? getStatePath(data.state) : undefined,
201201
},
202202
asyncCaptureLimit: data?.asyncCaptureLimit ?? 5,
203203
asyncCompareLimit: data?.asyncCompareLimit ?? 50,

0 commit comments

Comments
 (0)