Skip to content

Commit

Permalink
New: Add .init method (ref gulpjs/undertaker#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Oct 2, 2017
1 parent bab51a9 commit c7038c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ function DefaultRegistry(){
this._tasks = {};
}

DefaultRegistry.prototype.init = function init(taker){};

DefaultRegistry.prototype.get = function get(name){
return this._tasks[name];
};
Expand Down
9 changes: 9 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ describe('undertaker-registry', function(){
});
});

describe('init', function(){

it('is a noop', function(done){
var reg = new Registry();
expect(reg.init).to.be.a.function();
done();
});
});

describe('get', function(){

it('returns a task from the registry', function(done){
Expand Down

0 comments on commit c7038c7

Please sign in to comment.