@jsenv/snapshot 2.8.5 → 2.8.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/snapshot",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.6",
|
|
4
4
|
"description": "Snapshot testing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@jsenv/assert": "4.1.15",
|
|
37
|
-
"@jsenv/ast": "6.2.
|
|
37
|
+
"@jsenv/ast": "6.2.15",
|
|
38
38
|
"@jsenv/exception": "1.0.2",
|
|
39
39
|
"@jsenv/filesystem": "4.9.10",
|
|
40
40
|
"@jsenv/terminal-recorder": "1.4.4",
|
|
@@ -12,6 +12,9 @@ import { renderSideEffects, renderSmallLink } from "./render_side_effects.js";
|
|
|
12
12
|
* @param {Object} snapshotTestsOptions
|
|
13
13
|
* @param {string|url} snapshotTestsOptions.outFilePattern
|
|
14
14
|
* @param {string|url} snapshotTestsOptions.rootDirectoryUrl
|
|
15
|
+
* @param {Object} [snapshotTestsOptions.filesystemActions]
|
|
16
|
+
* Control what to do when there is a file side effect
|
|
17
|
+
* "compare", "compare_presence_only", "undo", "ignore"
|
|
15
18
|
* @param {Object|boolean} [snapshotTestsOptions.filesystemEffects]
|
|
16
19
|
* @param {boolean} [snapshotTestsOptions.filesystemEffects.textualFilesInline=false]
|
|
17
20
|
* Put textual files content in the markdown (instead of separate files).
|
|
@@ -43,6 +46,11 @@ export const snapshotTests = async (
|
|
|
43
46
|
throwWhenDiff = process.env.CI,
|
|
44
47
|
} = {},
|
|
45
48
|
) => {
|
|
49
|
+
filesystemActions = {
|
|
50
|
+
...filesystemActions,
|
|
51
|
+
"**/*.svg": "presence_only",
|
|
52
|
+
};
|
|
53
|
+
|
|
46
54
|
const sourceName = urlToBasename(sourceFileUrl, true);
|
|
47
55
|
const sourceBasename = urlToBasename(sourceFileUrl);
|
|
48
56
|
const sourceFilename = urlToFilename(sourceFileUrl);
|