Skip to content

Commit

Permalink
Update: Repair tests for babel change
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Dec 21, 2017
1 parent 2146218 commit 5e09eec
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ var code = require('code');

var child = require('child_process');

lab.experiment('flag: --completion', function () {
lab.experiment('flag: --completion', function() {

['bash', 'fish', 'powershell', 'zsh'].forEach(function(type) {
lab.test('returns completion script for ' + type, function (done) {
lab.test('returns completion script for ' + type, function(done) {
child.exec('node ' + __dirname + '/../bin/gulp.js --completion=' + type, function(err, stdout) {
code.expect(stdout).to.contain('gulp --completion=' + type);
done(err);
});
});
});

lab.test('shows error message for unknown completion type', function (done) {
lab.test('shows error message for unknown completion type', function(done) {
child.exec('node ' + __dirname + '/../bin/gulp.js --completion=unknown', function(err, stdout) {
code.expect(stdout).to.contain('rules for \'unknown\' not found');
done();
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/flags-task-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var output = fs.readFileSync(__dirname + '/expected/flags-tasks-simple.txt', 'ut
lab.experiment('flag: --tasks-simple', function() {

lab.test('prints the task list in simple format', function(done) {
child.exec('node ' + __dirname + '/../bin/gulp.js --tasks-simple --cwd ./test', function(err, stdout) {
child.exec('node ' + __dirname + '/../bin/gulp.js --tasks-simple --cwd ./test/fixtures', function(err, stdout) {
code.expect(stdout).to.equal(output);
done(err);
});
Expand Down
2 changes: 1 addition & 1 deletion test/flags-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var child = require('child_process');
lab.experiment('flag: --tasks', function() {

lab.test('prints the task list', function(done) {
child.exec('node ' + __dirname + '/../bin/gulp.js --tasks --cwd ./test', function(err, stdout) {
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');
Expand Down
2 changes: 1 addition & 1 deletion test/flags-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var gulpVersion = require('gulp/package.json').version;
lab.experiment('flag: --version', function() {

lab.test('prints the version of CLI and local gulp', function(done) {
child.exec('node ' + __dirname + '/../bin/gulp.js --version --cwd ./test', function(err, stdout) {
child.exec('node ' + __dirname + '/../bin/gulp.js --version --cwd ./test/fixtures', function(err, stdout) {
code.expect(stdout).to.contain('CLI version ' + cliVersion);
code.expect(stdout).to.contain('Local version ' + gulpVersion);
done(err);
Expand Down

0 comments on commit 5e09eec

Please sign in to comment.