I have 2 samples Mocha web tests which I'm trying to run using Velocity.
For some reason, client-side tests under the /tests/mocha/client folder are never executed, whereas the server side tests under the /tests/mocha/server folder run fine.
Here is the structure of my project todos (meteor example project)
- client
- lib
- packages
- server
- tests
- mocha
- client
- server
- mocha
Thoughts ?
I ran into this problem and it was related to having the browser-policy package installed.
What you need to do is look in the JavaScript console, e.g. in Chrome developer tools, look at the console tab. (Apple Key + option key + I). You should see errors like this:
You should still have this package installed for security purposes, but for a test do the following:
I would guess that you see your client tests running now? In my case I saw them as soon as I removed the browser-policy package. Basically what you need to do at this point is to tweak your browser policy settings for your application to allow the iframe for mocha, e.g.
http://localhost:5000
, but only for the development environment.Before changing the code put back the browser-policy package.
Now make the changes to your browser policy settings: