-
Notifications
You must be signed in to change notification settings - Fork 2
Testing
There really isn't a ton of code to test, but tests are nonetheless important and they should be written and included in the project repository. That's TBD.
This is a subject which is really outside the scope of couchPotato. Any app that is built with RequireJS and Angular is going to face testing challenges that are not unique to couchPotato. It isn't delivered as an AMD module because it is meant to be usable by apps that are not RequireJS-based. As long as couchPotato is loaded with a valid global angular object, it should function. If you use it in a RequireJS-based app, then the challenges of testing that app are no different than if couchPotato was not in the "mix."
There are some challenges. couchPotato makes it easy to pop some code in a .js file and wrap it in a $couchPotato.registerValue or registerDirective or whatever. But doing so comes with some costs.... and while there are a few, the cost of most interest within the subject of testing is that your code is wrapped in the little function... so what if couchPotato weren't available? How would your code function? Well it wouldn't! That means that if you want to test that code, you need to make couchPotato function in your testing environment, or couchPotato could come with a couchPotatoMocks rendition or something?