Permalink
Browse files

Fix fiber/record-tests to work on windows (slash differences) (#8796)

  • Loading branch information...
1 parent cd4afca commit c77632791f4ce1a56b5727a44e2e2b580ac4736b @tomgasson tomgasson committed with aweary Jan 15, 2017
Showing with 4 additions and 2 deletions.
  1. +4 −2 scripts/fiber/record-tests
@@ -106,12 +106,14 @@ function runJest(maxWorkers) {
function formatResults(runResults, predicate) {
const formatted = [];
runResults.testResults.forEach((fileResult) => {
- const file = path.relative(root, fileResult.testFilePath);
+ const filePath = path.relative(root, fileResult.testFilePath);
+ // on windows, we still want to output forward slashes
+ const unixFilePath = filePath.replace(/\\/g, '/');
const tests = fileResult.testResults.filter(
(test) => predicate(fileResult, test)
);
if (tests.length) {
- const lines = [file].concat(tests.map((test) => '* ' + test.title));
+ const lines = [unixFilePath].concat(tests.map((test) => '* ' + test.title));
formatted.push(lines.join('\n'));
}
});

0 comments on commit c776327

Please sign in to comment.