diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-02-29 21:50:48 +0100 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-02-29 21:50:48 +0100 |
commit | c08e5ce62c30cb8d014151448bfe6da6b5a47fcf (patch) | |
tree | fd9504c00d46786aebe2c65c6a95fa62edb363a7 /docs/plugins/testing.md | |
parent | ec353e179dedf1ebf1ab6e54f6217a88d087ea75 (diff) | |
download | gitbook-c08e5ce62c30cb8d014151448bfe6da6b5a47fcf.zip gitbook-c08e5ce62c30cb8d014151448bfe6da6b5a47fcf.tar.gz gitbook-c08e5ce62c30cb8d014151448bfe6da6b5a47fcf.tar.bz2 |
Improve structure of doc
Diffstat (limited to 'docs/plugins/testing.md')
-rw-r--r-- | docs/plugins/testing.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/plugins/testing.md b/docs/plugins/testing.md new file mode 100644 index 0000000..bf00da2 --- /dev/null +++ b/docs/plugins/testing.md @@ -0,0 +1,22 @@ +# Testing your plugin + +### Testing your plugin locally + +Testing your plugin on your book before plushing it is possible using [npm link](https://docs.npmjs.com/cli/link). + +In the plugin's folder, run: + +``` +$ npm link +``` + +The nin your book's folder: + +``` +$ npm link gitbook-plugin-<plugin's name> +``` + +### Unit testing on Travis + +[gitbook-tester](https://github.com/todvora/gitbook-tester) makes it easy to write **Node.js/Mocha** unit tests for your plugins. Using [Travis.org](https://travis.org), tests can be run on each commits/tags. + |