jest-snapshot
Advanced tools
Comparing version 13.2.2 to 13.2.3
@@ -137,8 +137,19 @@ /** | ||
this._uncheckedKeys.delete(key); | ||
const actual = unescape(this.serialize(value)); | ||
const serialized = this.serialize(value); | ||
const actual = unescape(serialized); | ||
const expected = this.get(key); | ||
const pass = expected === actual; | ||
if (pass) { | ||
// Executing a snapshot file as JavaScript and writing the strings back | ||
// when other snapshots have changed loses the proper escaping for some | ||
// characters. Since we check every snapshot in every test, use the newly | ||
// generated formatted string. | ||
// Note that this is only relevant when a snapshot is added and the dirty | ||
// flag is set. | ||
this._content[key] = serialized;} | ||
return { | ||
actual, | ||
expected, | ||
pass: expected === actual };} | ||
pass };} | ||
@@ -145,0 +156,0 @@ |
{ | ||
"name": "jest-snapshot", | ||
"version": "13.2.2", | ||
"version": "13.2.3", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
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
9651
250