Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-snapshot

Package Overview
Dependencies
Maintainers
4
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-snapshot - npm Package Compare versions

Comparing version 13.1.0 to 13.1.1

14

build/SnapshotFile.js

@@ -42,3 +42,4 @@ /**

const escape = string => string.replace(/\`/g, '\\`');
const escape = string => string.replace(/\`/g, '\\\`');
const unescape = string => string.replace(/\\(\"|\\)/g, '$1');

@@ -109,10 +110,7 @@ // Extra line breaks at the beginning and at the end of the snapshot are useful

if ((this._dirty || this._uncheckedKeys.size) && !isEmpty) {
const snapshots = [];
for (const key in this._content) {
const item = this._content[key];
snapshots.push(
'exports[`' + escape(key) + '`] = `' + escape(item) + '`;');}
const snapshots = Object.keys(this._content).sort().map(key =>
'exports[`' + escape(key) + '`] = `' +
escape(this._content[key]) + '`;');
ensureDirectoryExists(this._filename);

@@ -141,3 +139,3 @@ fs.writeFileSync(this._filename, snapshots.join('\n\n') + '\n');

this._uncheckedKeys.delete(key);
const actual = this.serialize(value);
const actual = unescape(this.serialize(value));
const expected = this.get(key);

@@ -144,0 +142,0 @@ return {

{
"name": "jest-snapshot",
"version": "13.1.0",
"version": "13.1.1",
"repository": {

@@ -11,4 +11,4 @@ "type": "git",

"dependencies": {
"jest-util": "^13.1.0",
"pretty-format": "^3.4.1"
"jest-util": "^13.1.1",
"pretty-format": "^3.4.3"
},

@@ -15,0 +15,0 @@ "scripts": {

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