MCPcopy Index your code
hub / github.com/processing/p5.js / createActualScreenshotMap

Function createActualScreenshotMap

visual-report.js:29–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28 // Create a lookup map for actual screenshots
29 function createActualScreenshotMap() {
30 const actualMap = new Map();
31 if (!fs.existsSync(actualDir)) {
32 console.warn(`Actual screenshots directory does not exist: ${actualDir}`);
33 return actualMap;
34 }
35
36 const files = fs.readdirSync(actualDir);
37 for (const file of files) {
38 if (file.endsWith('.png') && !file.endsWith('-diff.png')) {
39 actualMap.set(file, path.join(actualDir, file));
40 }
41 }
42
43 return actualMap;
44 }
45
46 const actualScreenshotMap = createActualScreenshotMap();
47

Callers 1

generateVisualReportFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected