Skip to content

Commit

Permalink
Removes testing if the file with replacements exist because onyly log…
Browse files Browse the repository at this point in the history
…ic, not test data should be tested
  • Loading branch information
Gromych committed Mar 3, 2016
1 parent 3f8c0a2 commit 7d22a46
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 @@ -23,9 +23,6 @@ describe('gulp-replace', function() {
it('should replace string on a buffer', function(done) {
var stream = replacePlugin('world', 'person');
stream.on('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);

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

String(newFile.contents).should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
});
Expand All @@ -51,9 +45,6 @@ describe('gulp-replace', function() {
it('should replace regex on a buffer 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);

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

String(newFile.contents).should.equal(fs.readFileSync('test/expected/helloworld.txt', 'utf8'));
done();
});
Expand All @@ -86,9 +74,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);

String(newFile.contents).should.equal(fs.readFileSync('test/expected/hellofarm.txt', 'utf8'));
done();
});
Expand All @@ -107,9 +92,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);

String(newFile.contents).should.equal(fs.readFileSync('test/expected/hellofarm.txt', 'utf8'));
done();
});
Expand Down

0 comments on commit 7d22a46

Please sign in to comment.