We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a229893 commit 26d2676Copy full SHA for 26d2676
visual-report.js
@@ -1,5 +1,6 @@
1
const fs = require('fs');
2
const path = require('path');
3
+const SLASH_REGEX = /\//g;
4
5
async function generateVisualReport() {
6
const expectedDir = path.join(process.cwd(), 'test/unit/visual/screenshots');
@@ -82,7 +83,7 @@ async function generateVisualReport() {
82
83
};
84
85
// Create flattened name for lookup
- const flattenedName = testDir.replace(/\//g, '-');
86
+ const flattenedName = testDir.replace(SLASH_REGEX, '-');
87
88
// Collect all screenshots for this test
89
for (let i = 0; i < test.numScreenshots; i++) {
0 commit comments