diff --git a/gulpfile.js b/gulpfile.js index b2170b6..65d6114 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -34,15 +34,13 @@ gulp.task('istanbul', function(done) { 'generators/**/index.js', 'gulpfile.js' ]) - .pipe(istanbul()) + .pipe(istanbul()) .pipe(istanbul.hookRequire()) .on('finish', function() { gulp.src(['test/*.js']) - .pipe(plumber()) - .pipe(mocha({ - reporter: 'spec' - })) + .pipe(mocha({reporter: 'spec'})) .pipe(istanbul.writeReports()) + .pipe(istanbul.enforceThresholds({thresholds: {global: 90}})) .on('end', done); }); }); diff --git a/test/gulp.js b/test/gulp.js index 18c7acd..c44df7a 100644 --- a/test/gulp.js +++ b/test/gulp.js @@ -122,12 +122,18 @@ describe('jekyllized:gulp', function() { it('contains deploy function', function() { assert.fileContent('gulpfile.js', 'function deploy'); + assert.fileContent('gulpfile.js', /\/\/ Task to deploy your site to Amazon S3 and Cloudfront/); }); it('contains deploy task', function() { assert.fileContent('gulpfile.js', 'gulp.task(\'deploy\''); }); + it('does not contain wrong uploading tasks', function() { + assert.noFileContent('gulpfile.js', /\/\/ Task to upload your site via Rsync to your server/); + assert.noFileContent('gulpfile.js', /\/\/ Task to upload your site to your personal GH Pages repo/); + }); + it('creates credentials file', function() { assert.file('aws-credentials.json'); }); @@ -166,12 +172,18 @@ describe('jekyllized:gulp', function() { it('contains deploy function', function() { assert.fileContent('gulpfile.js', 'function deploy'); + assert.fileContent('gulpfile.js', /\/\/ Task to upload your site via Rsync to your server/); }); it('contains deploy task', function() { assert.fileContent('gulpfile.js', 'gulp.task(\'deploy\''); }); + it('does not contain the wrong uploading task', function() { + assert.noFileContent('gulpfile.js', /\/\/ Task to deploy your site to Amazon S3 and Cloudfront/); + assert.noFileContent('gulpfile.js', /\/\/ Task to upload your site to your personal GH Pages repo/); + }); + it('creates credentials file', function() { assert.file('rsync-credentials.json'); }); @@ -210,10 +222,16 @@ describe('jekyllized:gulp', function() { it('contains deploy function', function() { assert.fileContent('gulpfile.js', 'function deploy'); + assert.fileContent('gulpfile.js', /\/\/ Task to upload your site to your personal GH Pages repo/); }); it('contains deploy task', function() { assert.fileContent('gulpfile.js', 'gulp.task(\'deploy\''); }); + + it('does not contain the wrong uploadgin task', function() { + assert.noFileContent('gulpfile.js', /\/\/ Task to upload your site via Rsync to your server/); + assert.noFileContent('gulpfile.js', /\/\/ Task to deploy your site to Amazon S3 and Cloudfront/); + }); }); });