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

Linking 2 local projects, without the Ugh factor

When working on a large scale application, eventually you’ll want to break it down to one or more product sub projects that all depend on a common project.

This post will discuss how to work with 2 projects properly while still using bower to manage dependencies

Continue reading

Free from include!

If you ever took part in any serious JS development in general and AngularJS specifically, you know that every time you create a new js file, you need to manually include a reference to it in the index.html file, other wise it won’t be included and the app will fail.

How would you feel about not having to do that?

Continue reading

AngularJS integration with Maven

When working on large scale projects, java back-end code is usually being built using Apache Maven.
This is usually part of a larger framework in charge of project life cycle that is part of the Continuous Integration DevOps realm, either Hudson, Jenkins or something else.
In such a case, you’d want your AngularJS code to run grunt/gulp as part of the CI procedure as well.

Continue reading