Skip to content

Commit

Permalink
Fix: Bind src/dest/symlink to the gulp instance to support esm export…
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed May 6, 2019
1 parent 4091bd3 commit 5667666
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function Gulp() {
this.registry = this.registry.bind(this);
this.tree = this.tree.bind(this);
this.lastRun = this.lastRun.bind(this);
this.src = this.src.bind(this);
this.dest = this.dest.bind(this);
this.symlink = this.symlink.bind(this);
}
util.inherits(Gulp, Undertaker);

Expand Down
60 changes: 60 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use strict';

var expect = require('expect');

var gulp = require('../');

describe('gulp', function() {

describe('hasOwnProperty', function() {
it('src', function(done) {
expect(gulp.hasOwnProperty('src')).toEqual(true);
done();
});

it('dest', function(done) {
expect(gulp.hasOwnProperty('dest')).toEqual(true);
done();
});

it('symlink', function(done) {
expect(gulp.hasOwnProperty('symlink')).toEqual(true);
done();
});

it('watch', function(done) {
expect(gulp.hasOwnProperty('watch')).toEqual(true);
done();
});

it('task', function(done) {
expect(gulp.hasOwnProperty('task')).toEqual(true);
done();
});

it('series', function(done) {
expect(gulp.hasOwnProperty('series')).toEqual(true);
done();
});

it('parallel', function(done) {
expect(gulp.hasOwnProperty('parallel')).toEqual(true);
done();
});

it('tree', function(done) {
expect(gulp.hasOwnProperty('tree')).toEqual(true);
done();
});

it('lastRun', function(done) {
expect(gulp.hasOwnProperty('lastRun')).toEqual(true);
done();
});

it('registry', function(done) {
expect(gulp.hasOwnProperty('registry')).toEqual(true);
done();
});
});
});

0 comments on commit 5667666

Please sign in to comment.