Hi I wanted to introduce a new library called Duck-Angular. I wrote it so that you can use it to unit test views (and associated bindings) as well as DOM interactions without the need to fire up Selenium or Protractor. The app is bootstrapped inside the unit test (which Duck makes convenient), with the opportunity to mock out any dependencies in scope, controllers, services, etc. Mocks can be plain objects you create yourself, if that's what you want. angular-mocks is not needed. The idea is to provide a simple, low-effort way of testing out views, their bindings, and even UI interactions without having to fire up the entire app in production mode.
The code is up at: https://github.com/asengupta/duck-angular An example app using Duck-Angular for testing is at: https://github.com/asengupta/AngularJS-RequireJS-Seed There are two branches - The master branch shows an example using Mocha/PhantomJS. - The karma-jasmine branch shows an example using Karma/Jasmine. Another example app shows using Duck-Angular without having to use RequireJS. https://github.com/kylehodgson/angular-toy Guides showing how to build up to using Duck-Angular are listed in this series of blog posts below. - Part One <http://avishek.net/blog/?p=1202> - Part Two <http://avishek.net/blog/?p=1188> - Part Three <http://avishek.net/blog/?p=1225> - Part Four <http://avishek.net/blog/?p=1239> - Part Five: Testing Directives <http://avishek.net/blog/?p=1489> - A Quick Recap <http://avishek.net/blog/?p=1472> I'm already using Duck-Angular on a project with around 600 of these tests finishing in 50-ish seconds. I'd welcome any feedback and/or opinions on this library. Please do not hesitate to ping me if you need any help trying this out on your project. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
