NOTE: Just released version 0.2.2 of ngImprovedTesting to fix issue #6 causing chained promises (i.e. .then(...).then(...)
) not to executed by a $q.tick(); also see README of the GitHub repo.
After quite a while I finally got round to creating version 0.2 of ngImprovedTesting.
The ModuleBuilder
API is unchanged and still makes mock testing AngularJS code much easier (be sure to read this blog post if you are unfamiliar with ngImprovedTesting).
Version 0.2 of ngImprovedTesting brings you the following interesting improvements:
- ngModuleIntrospector no longer uses internal AngularJS API.
- mocks can now also be created manually using the (global) “mockInstance” function.
- features a more descriptive way of testing promises by adding the
tick()
method to $q. - offers an module called “ngImprovedTesting” to be able to use $q.tick() in your tests without having to use the ModuleBuilder API (which automatically includes the module).