Merge pull request #217 from strongloop/fix-ci-windows

Normalize line endings to support both LF and CRLF [2.x]
This commit is contained in:
Miroslav Bajtoš 2016-09-23 15:55:29 +02:00 committed by GitHub
commit eeea74e0f7
1 changed files with 7 additions and 2 deletions

View File

@ -804,10 +804,11 @@ describe('executor', function() {
.get('/')
.end(function(err, res) {
if (err) return done(err);
expect(res.text).to.eql(('<!DOCTYPE html>\n<html>\n<head lang="en">\n' +
var EXPECTED_TEXT = '<!DOCTYPE html>\n<html>\n<head lang="en">\n' +
' <meta charset="UTF-8">\n <title>simple-app</title>\n' +
'</head>\n<body>\n<h1>simple-app</h1>\n' +
'</body>\n</html>').replace(/\n/g, os.EOL));
'</body>\n</html>';
expect(normalizeEols(res.text)).to.eql(normalizeEols(EXPECTED_TEXT));
done();
});
});
@ -1129,3 +1130,7 @@ function envAppInstructions() {
env: 'test',
});
}
function normalizeEols(str) {
return str.replace(/\r\n/g, '\n');
}