测试您的插件

在本地测试你的插件

使用npm link可以在发布之前测试你的插件。

在插件的文件夹中,运行:

$ npm link

然后在您的书或者文档的文件夹中执行:

$ npm link gitbook-plugin-<plugin's name>

Travis的单元测试

gitbook-tester可以方便地为你的插件编写Node.js/Mocha单元测试。 使用Travis.org,可以对每个提交/标签运行测试。

作者: 雪之梦技术驿站
链接: https://snowdreams1006.github.io/gitbook-official/zh/plugins/testing.html
来源: 雪之梦技术驿站
本文原创发布于「雪之梦技术驿站」,转载请注明出处,谢谢合作!

https://snowdreams1006.github.io/snowdreams1006-wechat-open.png

results matching ""

    No results matching ""