We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe7a148 commit 8149cd1Copy full SHA for 8149cd1
packages/reg-suit-cli/src/commands/compare.ts
@@ -4,7 +4,13 @@ import getRegCore from "../get-reg-core";
4
async function compare(options: CliOptions) {
5
const processor = getRegCore(options).createProcessor();
6
const ctx = await processor.getExpectedKey();
7
- await processor.compare(ctx);
+ const { comparisonResult } = await processor.compare(ctx);
8
+ const numberOfFailed = comparisonResult.failedItems.length;
9
+
10
+ if (numberOfFailed) {
11
+ throw new Error(`There were ${numberOfFailed} failed snapshots`);
12
+ }
13
14
return null;
15
}
16
0 commit comments