Skip to content

Commit

Permalink
Updated tests and the test runner task
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed May 19, 2015
1 parent bf65d66 commit 66e580d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gulpfile.js
Expand Up @@ -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);
});
});
Expand Down
18 changes: 18 additions & 0 deletions test/gulp.js
Expand Up @@ -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');
});
Expand Down Expand Up @@ -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');
});
Expand Down Expand Up @@ -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/);
});
});
});

0 comments on commit 66e580d

Please sign in to comment.