From c7038c798d42091042afbfac94ac1691ee8365cb Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 7 Jun 2015 20:18:06 -0700 Subject: [PATCH] New: Add `.init` method (ref gulpjs/undertaker#25) --- index.js | 2 ++ test/index.js | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/index.js b/index.js index da70afe..6798d13 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,8 @@ function DefaultRegistry(){ this._tasks = {}; } +DefaultRegistry.prototype.init = function init(taker){}; + DefaultRegistry.prototype.get = function get(name){ return this._tasks[name]; }; diff --git a/test/index.js b/test/index.js index 6d8b243..09a8a0a 100644 --- a/test/index.js +++ b/test/index.js @@ -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){