Whats the best way to go about testing a Meteor app currently, especially after the pass the parcel thingy that happened with Velocity, which is now in MDG’s lap? Why are basic testing tools like assert et al not part of the Meteor core?
Unit Testing (without a Meteor context)
We get ES6 modules with 1.3, which allows us to run unit tests without Meteor. The best way to do that will be to build your modules in a decoupled fashion and use tools like Jasmine or Mocha. These packages contain all the industry strength testing capability you need. It’s not completely clear what the Meteor Guide will recommend here, but the good thing is that you can make your own choices.
Integrated Testing (with a running Meteor instance)
For package testing:
practicalmeteor:mocha will be the recommended package that will be used in the Meteor guide.
End-to-end & acceptance:
Chimp will be the recommended acceptance / e2e testing solution that will be used in the Meteor Guide. You can write your tests in Mocha and / or Cucumber.js.
Here’s how we currently do testing and think it’s the best way to test a Meteor app. Unit testing is done outside of the Meteor context in realtime using Wallaby or at hyper-speed using Karma. Acceptance and end-to-end testing is done using our Chimp package
Why is a difficult question to answer. It seems that application-level testing was never been a big priority for the MDG. Most of Meteor itself was written with their in-house TinyTest package (which served them well) and a better solution was never prioritized. Velocity plugged this gap for a while but with every new Meteor release, it got slower due to things outside of our control (I was part of the Velocity core).
The future is bright, as you can see above good things are happening now so it’s better late than never!
Thanks Sam for a detailed answer. This has helped me a lot in understanding
about the current state and available tools for the present scenario.
Sent from mobile