diff --git a/package.json b/package.json index 9969cc5..7a8f2f3 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ }, "devDependencies": { "babel-eslint": "^6.1.0", + "from2-string": "^1.1.0", "gulp": "^3.9.0", "istanbul": "^0.4.4", "mocha": "^2.2.5", diff --git a/test/fixtures/fixable.js b/test/fixtures/fixable.js deleted file mode 100644 index de87be0..0000000 --- a/test/fixtures/fixable.js +++ /dev/null @@ -1 +0,0 @@ -var x = 0;; \ No newline at end of file diff --git a/test/fixtures/use-strict.js b/test/fixtures/use-strict.js deleted file mode 100644 index f8bfc97..0000000 --- a/test/fixtures/use-strict.js +++ /dev/null @@ -1,6 +0,0 @@ -(function () { - - void 0; - -}()); - diff --git a/test/linting.js b/test/linting.js index 2673aad..aaeff95 100644 --- a/test/linting.js +++ b/test/linting.js @@ -1,11 +1,11 @@ /* global describe, it*/ 'use strict'; -const fs = require('fs'); const path = require('path'); -const eslint = require('..'); const stream = require('stream'); +const eslint = require('..'); const File = require('vinyl'); +const from2string = require('from2-string'); const should = require('should'); const BufferStreams = require('bufferstreams'); @@ -94,7 +94,7 @@ describe('gulp-eslint plugin', () => { cwd: 'test/', base: 'test/fixtures', path: 'test/fixtures/use-strict.js', - contents: fs.createReadStream('test/fixtures/use-strict.js') + contents: from2string('(function () { void 0; })();') })); }); @@ -127,11 +127,11 @@ describe('gulp-eslint plugin', () => { lintStream.write(new File({ path: 'test/fixtures/use-strict.js', - contents: fs.createReadStream('test/fixtures/use-strict.js') + contents: from2string('(function () { void 0; })();') })); lintStream.write(new File({ path: 'test/fixtures/use-strict.js', - contents: fs.createReadStream('test/fixtures/use-strict.js') + contents: from2string('(function () { void 0; })();') })); lintStream.end(); @@ -287,7 +287,7 @@ describe('gulp-eslint plugin', () => { }) .end(new File({ path: 'test/fixtures/fixable.js', - contents: fs.createReadStream('test/fixtures/fixable.js') + contents: from2string('var x = 0;; ') })); });