|
1 | 1 | /* global describe, it*/
|
2 | 2 | 'use strict';
|
3 | 3 |
|
4 |
| -const fs = require('fs'); |
5 | 4 | const path = require('path');
|
6 |
| -const eslint = require('..'); |
7 | 5 | const stream = require('stream');
|
| 6 | +const eslint = require('..'); |
8 | 7 | const File = require('vinyl');
|
| 8 | +const from2string = require('from2-string'); |
9 | 9 | const should = require('should');
|
10 | 10 | const BufferStreams = require('bufferstreams');
|
11 | 11 |
|
@@ -94,7 +94,7 @@ describe('gulp-eslint plugin', () => {
|
94 | 94 | cwd: 'test/',
|
95 | 95 | base: 'test/fixtures',
|
96 | 96 | path: 'test/fixtures/use-strict.js',
|
97 |
| - contents: fs.createReadStream('test/fixtures/use-strict.js') |
| 97 | + contents: from2string('(function () { void 0; })();') |
98 | 98 | }));
|
99 | 99 | });
|
100 | 100 |
|
@@ -127,11 +127,11 @@ describe('gulp-eslint plugin', () => {
|
127 | 127 |
|
128 | 128 | lintStream.write(new File({
|
129 | 129 | path: 'test/fixtures/use-strict.js',
|
130 |
| - contents: fs.createReadStream('test/fixtures/use-strict.js') |
| 130 | + contents: from2string('(function () { void 0; })();') |
131 | 131 | }));
|
132 | 132 | lintStream.write(new File({
|
133 | 133 | path: 'test/fixtures/use-strict.js',
|
134 |
| - contents: fs.createReadStream('test/fixtures/use-strict.js') |
| 134 | + contents: from2string('(function () { void 0; })();') |
135 | 135 | }));
|
136 | 136 |
|
137 | 137 | lintStream.end();
|
@@ -287,7 +287,7 @@ describe('gulp-eslint plugin', () => {
|
287 | 287 | })
|
288 | 288 | .end(new File({
|
289 | 289 | path: 'test/fixtures/fixable.js',
|
290 |
| - contents: fs.createReadStream('test/fixtures/fixable.js') |
| 290 | + contents: from2string('var x = 0;; ') |
291 | 291 | }));
|
292 | 292 | });
|
293 | 293 |
|
|
0 commit comments