Skip to content

Commit

Permalink
Use gulp#4.0 for testing gulp-cli#4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
erikkemperman committed Oct 16, 2015
1 parent fa02755 commit ccad332
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"code": "^1.2.1",
"coveralls": "^2.7.0",
"gulp": ">=3.8.10",
"gulp": "gulpjs/gulp#4.0",
"jscs": "^1.11.3",
"jshint": "^2.5.0",
"jshint-stylish": "^2.0.1",
Expand Down
15 changes: 11 additions & 4 deletions test/fixtures/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

var gulp = require('gulp');

function noop() {}
function described() {}
function noop(done) {
done();
}

function described(done) {
done();
}

described.description = 'description';

gulp.task('test1', noop);
gulp.task('test2', ['test1'], noop);
gulp.task('test2', gulp.series('test1'));
gulp.task('test3', described);

gulp.task('default', ['test1', 'test3'], noop);
gulp.task('default', gulp.series('test1', 'test3'));

20 changes: 12 additions & 8 deletions test/flags-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ lab.experiment('flag: --tasks', function() {
child.exec('node ' + __dirname + '/../bin/gulp.js --tasks --cwd ./test/fixtures', function(err, stdout) {
code.expect(stdout).to.contain('Tasks for');
stdout = stdout.replace(/\\/g, '/').split('Tasks for')[1].split('\n');
code.expect(stdout[0]).to.contain('/gulp-cli/test');
code.expect(stdout[1]).to.contain('├── test1');
code.expect(stdout[2]).to.contain('├─┬ test2');
code.expect(stdout[3]).to.contain('│ └── test1');
code.expect(stdout[4]).to.contain('├── test3 description');
code.expect(stdout[5]).to.contain('└─┬ default');
code.expect(stdout[6]).to.contain(' ├── test1');
code.expect(stdout[7]).to.contain(' └── test3');
var i = 0;
code.expect(stdout[i++]).to.contain('/gulp-cli/test');
code.expect(stdout[i++]).to.contain('├── test1');
code.expect(stdout[i++]).to.contain('├─┬ test2');
code.expect(stdout[i++]).to.contain('│ └─┬ <series>');
code.expect(stdout[i++]).to.contain('│ └── test1');
code.expect(stdout[i++]).to.contain('├── test3 description');
code.expect(stdout[i++]).to.contain('└─┬ default');
code.expect(stdout[i++]).to.contain(' └─┬ <series>');
code.expect(stdout[i++]).to.contain(' ├── test1');
code.expect(stdout[i++]).to.contain(' └── test3');
done(err);
});
});

});

1 comment on commit ccad332

@erikkemperman
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, would be nicer to have a static file in /test/expect/ to test (most of) the output of gulp --tasks. As it stands this won't work because of the time stamps in that output. Maybe only show those for -LLLL (default being -LLL)?

Please sign in to comment.