Skip to content

Commit

Permalink
Ignore difference of newline output in diffing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottFreeCode authored and boneskull committed Dec 12, 2017
1 parent 2988a47 commit f7d6d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/diffs.spec.js
Expand Up @@ -7,7 +7,7 @@ var fs = require('fs');
var getDiffs = helpers.getDiffs;

function getExpectedOutput () {
var output = fs.readFileSync('test/integration/fixtures/diffs/output', 'UTF8');
var output = fs.readFileSync('test/integration/fixtures/diffs/output', 'UTF8').replace(/\r\n/g, '\n');

// Diffs are delimited in file by "// DIFF"
return output.split(/\s*\/\/ DIFF/).slice(1).map(function (diff) {
Expand All @@ -21,7 +21,7 @@ describe('diffs', function () {
before(function (done) {
run('diffs/diffs.fixture.js', ['-C'], function (err, res) {
expected = getExpectedOutput();
diffs = getDiffs(res.output);
diffs = getDiffs(res.output.replace(/\r\n/g, '\n'));
done(err);
});
});
Expand Down

0 comments on commit f7d6d8b

Please sign in to comment.