Skip to content

Commit

Permalink
Removes file existence testing from streaming input, because there's …
Browse files Browse the repository at this point in the history
…no need to test existence of test data
  • Loading branch information
Gromych committed Mar 3, 2016
1 parent caf5bfa commit 682dc61
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ describe('gulp-replace', function() {
it('should replace string on a stream', function(done) {
var stream = replacePlugin('world', 'person');
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
Expand All @@ -143,9 +140,6 @@ describe('gulp-replace', function() {
it('should replace regex on a stream', function(done) {
var stream = replacePlugin(/world/g, 'person');
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
Expand All @@ -159,9 +153,6 @@ describe('gulp-replace', function() {
it('should replace regex on a stream with a function', function(done) {
var stream = replacePlugin(/world/g, function() { return 'person'; });
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
Expand All @@ -175,9 +166,6 @@ describe('gulp-replace', function() {
it('should replace string on a stream with a function', function(done) {
var stream = replacePlugin('world', function() { return 'person'; });
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
Expand All @@ -197,9 +185,6 @@ describe('gulp-replace', function() {
];
var stream = replacePlugin('world', function() { return replacements.shift(); });
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/hellofarm.txt', 'utf8'));
done();
Expand All @@ -219,9 +204,6 @@ describe('gulp-replace', function() {
];
var stream = replacePlugin(/world/g, function() { return replacements.shift(); });
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

newFile.contents.pipe(concatStream({encoding: 'string'}, function(data) {
data.should.equal(fs.readFileSync('test/expected/hellofarm.txt', 'utf8'));
done();
Expand Down

0 comments on commit 682dc61

Please sign in to comment.