Posts

Showing posts from August, 2016

Automate JavaScript Testing with Grunt.js

So far we've learned how to test your JavaScript code with Jasmine and running them against Node.js and browsers with Karma . We've also got familiar with modular design patterns in JavaScript . And yet, somehow it seems that we're still missing one last puzzle piece connecting all the others, it's called Grunt.js . What is it? According to it's site: In one word: automation. The less work you have to do when performing repetitive tasks like minification , compilation, unit testing, linting , etc, the easier your job becomes. After you've configured it, a task runner can do most of that mundane work for you—and your team—with basically zero effort. Zero or not, there is a bit of effort in making everything play together, but no worry - we'll figure it out. So what's our plan? Write classes, which are both usable in Node.js, Require.js and global environment. Write Jasmine specs to test our code in both Chrome and Firefox Write Karma ...