Normalize line endings to support both LF and CRLF
This should fix build failures on Windows caused by line-ending mismatch.
This commit is contained in:
parent
748a728a4f
commit
49ed10caaf
|
@ -803,10 +803,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();
|
||||
});
|
||||
});
|
||||
|
@ -1128,3 +1129,7 @@ function envAppInstructions() {
|
|||
env: 'test',
|
||||
});
|
||||
}
|
||||
|
||||
function normalizeEols(str) {
|
||||
return str.replace(/\r\n/g, '\n');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue