Closed tianshuo closed 11 years ago
Thanks for the input. We're hoping to eventually have everything stubbed, and the approach we're taking is to mock things as they are needed. Was there something in specific you're after?
Sam
Definitely accounts, user, password, allow/deny. Also I found that all collection methods are empty functions. Maybe these need to mocked up too, since I'm will need to set user roles, and test security/permissions.
There's definitely going to be some challenges in those, but nothing that a few brains can't solve :)
So the stub is not intended to mock behaviour, but rather to expose the units of code that Meteor otherwise hides and makes inaccessible. If you want to mock, you can easily do that now using spies. The functions are empty because spies need the methods to exist before they can allow mocking. I'm not sure if you've seen this: Jasmine spies (https://github.com/pivotal/jasmine/wiki/Spies).
If you want to test that you've configured Meteor correctly, such as the integration of packages etc, you'll want to consider running the app in meteor and using PhantomJS. I've recently added support for this and I'll post a new blog about it soon.
There's a lot more in the stub now. I'm closing this issue until specific scenarios come up. Thanks
Including all those mentioned on http://docs.meteor.com