Skip to content

Commit

Permalink
chore: flailing around trying avoid 'no visual difference' snapshot g…
Browse files Browse the repository at this point in the history
…arbage on Windows
  • Loading branch information
evocateur committed Sep 11, 2018
1 parent b8915e7 commit 7bd3179
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helpers/normalize-test-root/index.js
Expand Up @@ -11,7 +11,10 @@ const TEMP_DIR_REGEXP = /([^\s"]*[\\/][0-9a-f]{32})([^\s"]*)/g;
// the excluded quotes are due to other snapshot serializers mutating the raw input

function normalizeTestRoot(str) {
return normalizeNewline(str).replace(TEMP_DIR_REGEXP, serializeTestRoot);
const ret = normalizeNewline(str).replace(TEMP_DIR_REGEXP, serializeTestRoot);

// desperately trying to avoid "Compared values have no visual difference" garbage in Windows CI
return JSON.parse(JSON.stringify(ret));
}

function serializeTestRoot(match, cwd, subPath) {
Expand Down

0 comments on commit 7bd3179

Please sign in to comment.