Socket
Socket
Sign inDemoInstall

jest-specific-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-specific-snapshot - npm Package Compare versions

Comparing version 0.5.0 to 1.0.0

0

.eslintrc.js

@@ -0,0 +0,0 @@ const error = 2;

13

dist/index.js

@@ -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 @@

4

package.json
{
"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 .",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc