Skip to content

Commit

Permalink
Fix lint and switch to use regex matching instead of endsWith/Os.EOL …
Browse files Browse the repository at this point in the history
…in output tests.
  • Loading branch information
Invader444 committed Dec 4, 2018
1 parent 072c02e commit 4b12c69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/linters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Load modules

const Fs = require('fs');
const Os = require('os');
const Path = require('path');
const _Lab = require('../test_runner');
const Code = require('code');
Expand Down Expand Up @@ -155,8 +154,7 @@ describe('Linters - eslint', () => {
Fs.writeFileSync = (path, output) => {

expect(path).to.endWith(Path.join('test', 'lint', 'eslint', 'fix', 'success.js'));

expect(output).to.endWith(Os.EOL + ' return value;' + Os.EOL + '};' + Os.EOL);
expect(output).to.match(/\r?\n return value;\r?\n\};\r?\n/);
isFixed = true;
};

Expand Down

0 comments on commit 4b12c69

Please sign in to comment.