@vitest/snapshot 3.1.1 → 3.1.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.
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -1475,9 +1475,9 @@ function prepareSnapString(snap, source, index) {
|
|
1475
1475
|
const isOneline = lines.length <= 1;
|
1476
1476
|
const quote = "`";
|
1477
1477
|
if (isOneline) {
|
1478
|
-
return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "
|
1478
|
+
return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}${quote}`;
|
1479
1479
|
}
|
1480
|
-
return `${quote}\n${lines.map((i) => i ? indentNext + i : "").join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "
|
1480
|
+
return `${quote}\n${lines.map((i) => i ? indentNext + i : "").join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}\n${indent}${quote}`;
|
1481
1481
|
}
|
1482
1482
|
const toMatchInlineName = "toMatchInlineSnapshot";
|
1483
1483
|
const toThrowErrorMatchingInlineName = "toThrowErrorMatchingInlineSnapshot";
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/snapshot",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.1.
|
4
|
+
"version": "3.1.2",
|
5
5
|
"description": "Vitest snapshot manager",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -40,12 +40,12 @@
|
|
40
40
|
"dependencies": {
|
41
41
|
"magic-string": "^0.30.17",
|
42
42
|
"pathe": "^2.0.3",
|
43
|
-
"@vitest/pretty-format": "3.1.
|
43
|
+
"@vitest/pretty-format": "3.1.2"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@types/natural-compare": "^1.4.3",
|
47
47
|
"natural-compare": "^1.4.0",
|
48
|
-
"@vitest/utils": "3.1.
|
48
|
+
"@vitest/utils": "3.1.2"
|
49
49
|
},
|
50
50
|
"scripts": {
|
51
51
|
"build": "rimraf dist && rollup -c",
|