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 committed Aug 2, 2017
1 parent 075bd51 commit 50249a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/diffs.spec.js
Original file line number Diff line number Diff line change
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 50249a2

Please sign in to comment.