1
votes

It's really a newbie question: I checkout this Apache Cordova Plugin code: https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-device.git;a=tree

I'm using it to inspire myself on creating a new Plugin, but I would like to understand how do I run the tests that are in the test folder. Which command should I execute?

2

2 Answers

2
votes

I was successfully able to test my plugin using https://github.com/apache/cordova-plugin-test-framework

One thing to note that is really important, when you add your own plugin to your test app, you must also separately add the *your_id*.tests plugin (in your /tests directory) as well or it won't work.

-1
votes

To test existing plugins you have to use Cordova Mobile Spec. This project allow testing of the core Cordova plugins. Right now there no way you could run test for single plugin and should test all core plugins that Cordova have.