A lot of applications these days have a substantial, if not a major, part written in JavaScript. And not only for the front-end part, as Node.js is gaining popularity on the back-end. You might already have started doing some unit testing for your JavaScript code, but JavaScript has a quite a few concepts where it differs from traditional back-end programming languages like C# or Ruby. This fast-paced talk will show best practices for unit testing code involving 7 of those concepts. We will cover:
- Asynchronous code, both with callbacks and with promises
- Time and timers
- Ajax requests
- DOM manipulation
- Responsive design with CSS media queries
- Cross browser compatibility
- Leak detection