Learning Angular: Unit Testing watch expressions
- If you’re using the controller as syntax, make sure you set it (see example before).
- Now consider we have some watch expression defined in the controller, which we’d like to test.
- Changing to
Read the full article, click here.
@javacodegeeks: “Learning Angular: Unit Testing watch expressions”
Today I wanted to write a unit test for a watch expression on my controller. What seemed quite obvious initially, turned out to be quite nasty. Anyway, thx to a nice community member on the Angular IRC, I was able to quickly resolve the issue. So, here’s the story.
Learning Angular: Unit Testing watch expressions | Web Code Geeks – 2016