Testing AngularJS UI-Route routes

Testing AngularJS UI-Router routes

Tests are important. In our AngularJS applications we have tons of stuff to test, we have unit tests on components, filters, directives and other AngularJS features, we have tests on templates and we also have tests on routes. Most sophisticated AngularJS applications might contain more than one page to display, so you need to have a routing mechanism to navigate to different components in the application.

The thing is how you test this? How you test your routed components? How you test the template with the routing directives?

That is exactly what I am going to talk about in this post. I prefer the AngularUI-Router, because it is really powerful, so this post will contain examples using this framework.

Continue reading


ES6 generators and async/await in Typescript

Some exciting features Javascript has developed during the latest versions (ES6, ES2016) are without doubt the generator functions and the async/await support.

These features exist in Typescript for quite some time; the language supported async/await since 1.7 version. But what about them? What they really are and how they work?
In this post I am going to explore their world, their Typescript syntax and implementations.

Continue reading

Migrating from typings to npm @types

Typescript definitions. What a confusing topic. Prior to Typescript 2.0 we were using tools like typings to manage and install them. After 2.0 we moved to npm@types, but what does that really mean? And how can we migrate an existing project that uses typings? What about custom type definitions?

In this post I will show you how to migrate to newest @types, answering all these questions.

Continue reading