Testing a pre-1.3 Meteor app?


#1

Hey guys, I’m starting to contribute to an app that was started pre-Meteor 1.3 and still uses the “old” directory layout (i.e. no imports). After reading the Meteor Testing guide for 1.3, I noticed that the recommended way to use practicalmeteor:mocha makes heavy use of the new imports feature.

While it’s probably not too difficult to update this app to Meteor 1.3, migrating it to the new directory structure would be quite a bit of work, so I’m looking for a way to add tests without disrupting the existing code and layout too much.

Is it possible to do that using practicalmeteor:mocha, or should I be looking at the pre-1.3 testing solutions (i.e. Velocity / mike:mocha)?


#2

You can test your app with the Meteor 1.3 app testing. Just run your tests with the --full-app argument. This will load your whole app before the tests run. Then it is easy to tests things that are in the global scope.


#3

Thanks @Sanjo, I’ll give that a try. I’ll report back with my findings.


#5

Hey @pandawhisperer did work for you? Here even with the --full-app argument I get some referenceError because I dont have the imports in project