The examples I've seen with velocity tests is to put everything in a top level /tests/mocha/MyTest.js, /tests/mocha/OtherTest.js.
I'd like to organize my unit tests into the package they are testing.
E.g.
/my-app
/my-app/packages/my-package
/my-app/packages/my-package/my-package-test.js
In fact, this is the layout that gets created when you run "meteor package create my-package, but I can't figure out how to run my-package-test within the velocity test runner, short of something hackish like symlinking
cd my-app/tests/mocha/client
ln -s ../../packages/my-package/my-package-tests.js
Apart from being annoying to manage these symlinks, this requires exporting anything I'd like to unit test, even though it's not being used in any other packages. Is there a better way?
Aucun commentaire:
Enregistrer un commentaire