JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...

Popular Tags - Filter using the Funnel

Current selected tags: 'Karma', 'directive'. Clear
Scoop.it!

Testing AngularJS directive templates with Jasmine and Karma

Testing AngularJS directive templates with Jasmine and Karma | JavaScript for Line of Business Applications | Scoop.it

In my day job, I work on appear.in, a video chat service built with AngularJS and WebRTC. Recently, our application has become more complex, and our HTML templates ended up having a lot of state in them. We could no longer just use unit testing to verify our application logic, we also needed to test the state in our templates.

For our unit testing, we landed on using Jasmine and Karma, and this has worked fairly well for us. So when we wanted to test our templates, we wanted to use the same tools.

No comment yet.
Scoop.it!

Unit testing an AngularJS directive

Unit testing an AngularJS directive | JavaScript for Line of Business Applications | Scoop.it

In this article, i’ll detail the process to unit test the stepper directive we’ve created in the last week custom component creation article. Next week, i’ll cover how to distribute your component via GitHub and Bower.

Unit testing is the art of testing individually every smallest part of your code, which are the foundations of your apps sanity. Once correctly tested, these parts assembled together will also play nicely, as their behaviour has already been validated independently.

Unit testing helps you prevent regressions, increase quality, maintenability, and trust in your codebase, thus better team collaboration, easier refactoring… and WIN :)

Another usage is, when you get a new bug report, you add the revelant test that demo the bug, fix it in your code so the test will pass, then keep it there as a proof of reliability.

No comment yet.