jest-specific-snapshot
Advanced tools
Comparing version 0.5.0 to 1.0.0
@@ -0,0 +0,0 @@ const error = 2; |
@@ -18,2 +18,3 @@ 'use strict'; | ||
var snapshotsStateMap = new Map(); | ||
var commonSnapshotState = void 0; | ||
@@ -33,2 +34,11 @@ function getAbsolutePathToSnapshot(testPath, snapshotFile) { | ||
snapshotState.save(); | ||
if (commonSnapshotState) { | ||
// Update common state so we get the report right with added/update/unmatched snapshots. | ||
// Jest will display the "u" & "i" suggestion, plus displaying the right number of update/added/unmatched snapshots. | ||
commonSnapshotState.unmatched += snapshotState.unmatched; | ||
commonSnapshotState.matched += snapshotState.matched; | ||
commonSnapshotState.updated += snapshotState.updated; | ||
commonSnapshotState.added += snapshotState.added; | ||
} | ||
}); | ||
@@ -40,3 +50,4 @@ }); | ||
var commonSnapshotState = this.snapshotState; | ||
// store the common state to re-use it in "afterAll" hook. | ||
commonSnapshotState = this.snapshotState; | ||
var snapshotState = snapshotsStateMap.get(absoluteSnapshotFile); | ||
@@ -43,0 +54,0 @@ |
{ | ||
"name": "jest-specific-snapshot", | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -8,3 +8,3 @@ "repository": "https://github.com/igor-dv/jest-specific-snapshot", | ||
"scripts": { | ||
"example": "jest specific.napshot.test", | ||
"example": "jest specific.snapshot.test", | ||
"babel": "babel src -d dist", | ||
@@ -11,0 +11,0 @@ "lint": "eslint .", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7972
94
1