summaryrefslogtreecommitdiffstats
path: root/test/node_modules/gitbook-plugin-test-hooks
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-04-18 17:14:55 +0200
committerSamy Pessé <samypesse@gmail.com>2016-04-18 17:14:55 +0200
commitd07aa13822230ee5086bafcb9ea16cb8447fb562 (patch)
tree14259c6254d20919a9964f96f5e90133af1cc689 /test/node_modules/gitbook-plugin-test-hooks
parentc218f7d0e30d8088ebd09951691647ffed7fe91d (diff)
downloadgitbook-d07aa13822230ee5086bafcb9ea16cb8447fb562.zip
gitbook-d07aa13822230ee5086bafcb9ea16cb8447fb562.tar.gz
gitbook-d07aa13822230ee5086bafcb9ea16cb8447fb562.tar.bz2
Add tests for page hook
Diffstat (limited to 'test/node_modules/gitbook-plugin-test-hooks')
-rw-r--r--test/node_modules/gitbook-plugin-test-hooks/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/node_modules/gitbook-plugin-test-hooks/index.js b/test/node_modules/gitbook-plugin-test-hooks/index.js
index c0666ca..cd9d1b0 100644
--- a/test/node_modules/gitbook-plugin-test-hooks/index.js
+++ b/test/node_modules/gitbook-plugin-test-hooks/index.js
@@ -1,5 +1,3 @@
-var should = require('should');
-
module.exports = {
hooks: {
'init': function() {
@@ -11,6 +9,10 @@ module.exports = {
},
'finish:before': function() {
global._hooks.push('finish:before');
+ },
+ page: function(page) {
+ page.content = 'Hello ' + page.content;
+ return page;
}
}
};