I’m trying to write unit tests for the pimatic-mysensors plugin.
I wanted to use the unit tests from several other pimatic plugins as starting point.
My problem is, that I’m not able to run tests for e.g. the pimatic-cron plugin.
When I try to run the unit tests from the command line with the following command:
mocha cron-test.coffee --compilers coffee:coffee-script/register
no unit tests are found (the command line states " 0 passing (0ms)").
It seems, that the “module.exports = (env) ->” causes this problem.
When I run the same command without the “module.exports…”, the unit tests are found by mocha.
Can anyone tell me how to run the unit tests of the pimatic-plugins? What command line options are necessary?
In the end, I would like to have some kind of “dummy” framework object to be able to test my plugin.