mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
22 lines
593 B
JavaScript
22 lines
593 B
JavaScript
var should = require('should');
|
|
|
|
module.exports = {
|
|
blocks: {
|
|
// Simple test
|
|
hello: function(blk) {
|
|
return 'Hello ' + blk.body + '!';
|
|
},
|
|
|
|
// Test using the conetxt "this"
|
|
testContext: function(s) {
|
|
this.should.have.property('config');
|
|
this.should.have.property('log');
|
|
this.should.have.property('options');
|
|
this.should.have.property('resolve').which.is.a.function;
|
|
this.should.have.property('book').which.equal(this);
|
|
|
|
return 'Hello ' + s + '!';
|
|
}
|
|
}
|
|
};
|