diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-22 15:34:35 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-22 15:34:35 +0100 |
commit | 6653307fda137253cd10d4d4f6d2e010c1c0f604 (patch) | |
tree | 754d73e1dadc19e692bfce468e674cd66eff8a0a /test/node_modules | |
parent | 642ba72a1d0680107357083a79560c2ccc931457 (diff) | |
download | gitbook-6653307fda137253cd10d4d4f6d2e010c1c0f604.zip gitbook-6653307fda137253cd10d4d4f6d2e010c1c0f604.tar.gz gitbook-6653307fda137253cd10d4d4f6d2e010c1c0f604.tar.bz2 |
Add tests for context of filters
Diffstat (limited to 'test/node_modules')
-rw-r--r-- | test/node_modules/gitbook-plugin-test-filters/index.js | 21 | ||||
-rw-r--r-- | test/node_modules/gitbook-plugin-test-filters/package.json | 7 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/node_modules/gitbook-plugin-test-filters/index.js b/test/node_modules/gitbook-plugin-test-filters/index.js new file mode 100644 index 0000000..71f2752 --- /dev/null +++ b/test/node_modules/gitbook-plugin-test-filters/index.js @@ -0,0 +1,21 @@ +var should = require('should'); + +module.exports = { + filters: { + // Simple test + hello: function(s) { + return 'Hello ' + s + '!'; + }, + + // 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 + '!'; + } + } +}; diff --git a/test/node_modules/gitbook-plugin-test-filters/package.json b/test/node_modules/gitbook-plugin-test-filters/package.json new file mode 100644 index 0000000..d555d06 --- /dev/null +++ b/test/node_modules/gitbook-plugin-test-filters/package.json @@ -0,0 +1,7 @@ +{ + "name": "gitbook-plugin-test-filters", + "version": "1.0.0", + "engines": { + "gitbook": "*" + } +}
\ No newline at end of file |