diff options
Diffstat (limited to 'test/plugins.js')
-rw-r--r-- | test/plugins.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/plugins.js b/test/plugins.js index 172e00c..4d9cdf1 100644 --- a/test/plugins.js +++ b/test/plugins.js @@ -175,5 +175,21 @@ describe('Plugins', function() { blocks.testContext.process({ body: 'Hello' }); }); }); + + describe('Hooks', function() { + var plugin; + + before(function() { + plugin = new BookPlugin(book, 'test-hooks'); + return plugin.load(PLUGINS_ROOT); + }); + + it('can call a hook', function() { + return plugin.hook('init') + .then(function() { + global._hooks.should.deepEqual(['init']); + }); + }); + }); }); |