Skip to content

Commit bcb4b17

Browse files
committed
feat: snapshot
1 parent a6d0f4d commit bcb4b17

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

package.json

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

src/snapshot.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ const generateHtmlReportSummary = (backstopDir: string, summaries: HtmlReportSum
127127
let html = '';
128128

129129
for (const summary of summaries) {
130+
if (!summary) {
131+
continue;
132+
}
133+
130134
const successClass = summary.totalPassed === summary.totalTests ? 'class="success"' : '';
131135
const dangerClass = summary.totalFailed > 0 ? 'class="danger"' : '';
132136

@@ -155,7 +159,10 @@ export function snapshot({ configs, backstopDirName }: { configs: Config[]; back
155159
const htmlReportSummary: HtmlReportSummary[] = [];
156160

157161
for (const config of configs) {
158-
processTestSuite(backstopDir, config);
162+
const summary = processTestSuite(backstopDir, config);
163+
if (summary) {
164+
htmlReportSummary.push(summary);
165+
}
159166
}
160167

161168
generateHtmlReportSummary(backstopDir, htmlReportSummary);

0 commit comments

Comments
 (0)