From 682dc61c9e131ceddcc9fc2de0077bdcaa440b7e Mon Sep 17 00:00:00 2001 From: Gromych Date: Thu, 3 Mar 2016 22:34:14 +0300 Subject: [PATCH] Removes file existence testing from streaming input, because there's no need to test existence of test data --- test/main.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/test/main.js b/test/main.js index a7c3d6a..b36ad6d 100644 --- a/test/main.js +++ b/test/main.js @@ -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(); @@ -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(); @@ -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(); @@ -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(); @@ -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(); @@ -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();