Skip to content

Commit

Permalink
mock stream-mode vinyl files with from2-string
Browse files Browse the repository at this point in the history
  • Loading branch information
shinnn committed Jul 4, 2016
1 parent bcd7736 commit eb98701
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/fixable.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/use-strict.js

This file was deleted.

12 changes: 6 additions & 6 deletions test/linting.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down Expand Up @@ -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; })();')
}));
});

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;; ')
}));
});

Expand Down

0 comments on commit eb98701

Please sign in to comment.