@regressionproof/jest-reporter 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,7 @@ export default class RegressionProofReporter implements Reporter {
|
|
|
3
3
|
private cwd;
|
|
4
4
|
private isCi;
|
|
5
5
|
private config;
|
|
6
|
+
private snapshotter;
|
|
6
7
|
constructor(_globalConfig?: unknown, _reporterConfig?: unknown);
|
|
7
8
|
onRunStart(_results: AggregatedResult, _options: ReporterOnStartOptions): void;
|
|
8
9
|
onTestFileStart(_test: Test): void;
|
|
@@ -12,6 +12,7 @@ const version_js_1 = require("./utilities/version.js");
|
|
|
12
12
|
class RegressionProofReporter {
|
|
13
13
|
constructor(_globalConfig, _reporterConfig) {
|
|
14
14
|
this.config = null;
|
|
15
|
+
this.snapshotter = snapshotter_1.Snapshotter.Snapshotter({ mode: 'sync' });
|
|
15
16
|
this.cwd = process.cwd();
|
|
16
17
|
this.isCi = process.env.CI === 'true' || process.env.IS_CI === 'true';
|
|
17
18
|
}
|
|
@@ -29,7 +30,7 @@ class RegressionProofReporter {
|
|
|
29
30
|
version: (0, version_js_1.getPackageVersion)(),
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
this.snapshotter.checkForPreviousFailure(this.config.mirrorPath);
|
|
33
34
|
}
|
|
34
35
|
onTestFileStart(_test) { }
|
|
35
36
|
onTestCaseResult(_test, _testCaseResult) { }
|
|
@@ -50,13 +51,13 @@ class RegressionProofReporter {
|
|
|
50
51
|
if (typeErrors.length > 0) {
|
|
51
52
|
console.log(`[RegressionProof] ${typeErrors.length} type error(s) found`);
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
await this.snapshotter.snapshot({
|
|
54
55
|
sourcePath: this.cwd,
|
|
55
56
|
mirrorPath: this.config.mirrorPath,
|
|
56
57
|
testResults,
|
|
57
58
|
remote: this.config.remote,
|
|
58
59
|
});
|
|
59
|
-
console.log('[RegressionProof] Snapshot
|
|
60
|
+
console.log('[RegressionProof] Snapshot complete');
|
|
60
61
|
}
|
|
61
62
|
getLastError() {
|
|
62
63
|
return undefined;
|
|
@@ -3,6 +3,7 @@ export default class RegressionProofReporter implements Reporter {
|
|
|
3
3
|
private cwd;
|
|
4
4
|
private isCi;
|
|
5
5
|
private config;
|
|
6
|
+
private snapshotter;
|
|
6
7
|
constructor(_globalConfig?: unknown, _reporterConfig?: unknown);
|
|
7
8
|
onRunStart(_results: AggregatedResult, _options: ReporterOnStartOptions): void;
|
|
8
9
|
onTestFileStart(_test: Test): void;
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { Snapshotter } from '@regressionproof/snapshotter';
|
|
11
11
|
import { loadConfig, detectProjectName, } from './config/loadConfig.js.js';
|
|
12
12
|
import SpruceError from './errors/SpruceError.js.js';
|
|
13
13
|
import { transformResults } from './transformers/transformResults.js.js';
|
|
@@ -16,6 +16,7 @@ import { getPackageVersion } from './utilities/version.js.js';
|
|
|
16
16
|
export default class RegressionProofReporter {
|
|
17
17
|
constructor(_globalConfig, _reporterConfig) {
|
|
18
18
|
this.config = null;
|
|
19
|
+
this.snapshotter = Snapshotter.Snapshotter({ mode: 'sync' });
|
|
19
20
|
this.cwd = process.cwd();
|
|
20
21
|
this.isCi = process.env.CI === 'true' || process.env.IS_CI === 'true';
|
|
21
22
|
}
|
|
@@ -34,7 +35,7 @@ export default class RegressionProofReporter {
|
|
|
34
35
|
version: getPackageVersion(),
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
this.snapshotter.checkForPreviousFailure(this.config.mirrorPath);
|
|
38
39
|
}
|
|
39
40
|
onTestFileStart(_test) { }
|
|
40
41
|
onTestCaseResult(_test, _testCaseResult) { }
|
|
@@ -56,13 +57,13 @@ export default class RegressionProofReporter {
|
|
|
56
57
|
if (typeErrors.length > 0) {
|
|
57
58
|
console.log(`[RegressionProof] ${typeErrors.length} type error(s) found`);
|
|
58
59
|
}
|
|
59
|
-
snapshot({
|
|
60
|
+
yield this.snapshotter.snapshot({
|
|
60
61
|
sourcePath: this.cwd,
|
|
61
62
|
mirrorPath: this.config.mirrorPath,
|
|
62
63
|
testResults,
|
|
63
64
|
remote: this.config.remote,
|
|
64
65
|
});
|
|
65
|
-
console.log('[RegressionProof] Snapshot
|
|
66
|
+
console.log('[RegressionProof] Snapshot complete');
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
getLastError() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regressionproof/jest-reporter",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"watch.tsc": "tsc -w"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@regressionproof/snapshotter": "^0.7.
|
|
38
|
+
"@regressionproof/snapshotter": "^0.7.2",
|
|
39
39
|
"@sprucelabs/error": "^8.1.2",
|
|
40
40
|
"@sprucelabs/schema": "^33.1.3",
|
|
41
41
|
"@sprucelabs/spruce-core-schemas": "^42.1.3",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "a557f1266fcb9720f9551efb6fa6523e7390101e"
|
|
86
86
|
}
|