Skip to content

Commit 4b12c69

Browse files
committedDec 4, 2018
Fix lint and switch to use regex matching instead of endsWith/Os.EOL in output tests.
1 parent 072c02e commit 4b12c69

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎test/linters.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Load modules
44

55
const Fs = require('fs');
6-
const Os = require('os');
76
const Path = require('path');
87
const _Lab = require('../test_runner');
98
const Code = require('code');
@@ -155,8 +154,7 @@ describe('Linters - eslint', () => {
155154
Fs.writeFileSync = (path, output) => {
156155

157156
expect(path).to.endWith(Path.join('test', 'lint', 'eslint', 'fix', 'success.js'));
158-
159-
expect(output).to.endWith(Os.EOL + ' return value;' + Os.EOL + '};' + Os.EOL);
157+
expect(output).to.match(/\r?\n return value;\r?\n\};\r?\n/);
160158
isFixed = true;
161159
};
162160

0 commit comments

Comments
 (0)
Please sign in to comment.