2

我正在为 iOS 和 Android 平台开发一个 cordova 插件。我用谷歌搜索并获得了用于编写单元测试的https://github.com/apache/cordova-plugin-test-framework 。但是我找不到任何方法来测试我的代码的覆盖率。帮帮我的朋友......

4

1 回答 1

2

我也在研究 cordova-plugin-test-framework ,今天已经成功运行测试了:)

我发现,我们不需要配置plugin.xml文件......使用cordova-plugin.js和tests.js就足够了,就像创建一个新插件一样。

您可以从 github 获取我的示例:

https://github.com/QiuZidane/hello2.git -- 安卓

https://github.com/QiuZidane/hello1.git -- ios

于 2015-12-13T03:07:28.947 回答