Why should you use angular-cli?

A project should have a bundler, regardless of the technology stack. A bundler is software that bundles your application code along with its resources into a minimized, zipped bundle that can be easily deployed on the server (at its most basic form).

There are many bundlers out there, most widely used are Grunt, Gulp and lately, Webpack. They each take a different approach to fulfill the task at hand – but Webpack really stands out from the crowd.

Continue reading

Jasmine describe override

Say you want to test your Angular application.

To do that you’ll be implementing Unit tests (with the Jasmine + Karma + PhantomJS stack) or E2E tests (with the Jasmine + Protractor stack).
You could choose any other stack using Cucumber, mocha, chai or any other testing framework – the principle of today’s topic remains the same.

The scenario is this:
There’s this piece of setup code that needs to be executed before each spec in every suite (performing login, for example).
I chose before each spec for the sake of the argument, but the same concept could be applied to before all specs in the suite and/or after each and after all specs in the suite.

for the sake of the post: describe = suite and it = spec.

Continue reading