mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Add tests for page hook
This commit is contained in:
+4
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user