Wrapping 3rd party libraries can be a challenge when dealing with Angular directives. The four steps laid out in this article should help.
Dependency Injection
A collection of 4 posts
A Beginner's Guide To Unit Testing Functions with Side Effects
When people get started with unit testing, they often get stumped when it comes to testing functions that have side effects. This post is a gentle introduction to some of the concepts involved in testing side effects.
The Spy of Testadel: A Medieval Testing Tale
The kingdom of Testadel is under threat. Learn how to test side effects in your code through this medieval tale of lies, deceit, magic and espionage.
Dependency Inversion in Angular
Angular has a powerful dependency injection system. Learn how to use it so that your code complies with the Dependency Inversion Principle.