Skip to content

Commit

Permalink
chore(helpers): Normalize newlines to coddle windows
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Sep 11, 2018
1 parent 2a6f0a4 commit a379266
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/normalize-test-root/index.js
@@ -1,5 +1,6 @@
"use strict";

const normalizeNewline = require("normalize-newline");
const normalizePath = require("normalize-path");
const path = require("path");

Expand All @@ -10,7 +11,7 @@ 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 str.replace(TEMP_DIR_REGEXP, serializeTestRoot);
return normalizeNewline(str).replace(TEMP_DIR_REGEXP, serializeTestRoot);
}

function serializeTestRoot(match, cwd, subPath) {
Expand Down
1 change: 1 addition & 0 deletions helpers/normalize-test-root/package.json
Expand Up @@ -6,6 +6,7 @@
"private": true,
"license": "MIT",
"dependencies": {
"normalize-newline": "^3.0.0",
"normalize-path": "^3.0.0"
}
}
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a379266

Please sign in to comment.