Code: https://github.com/larsthorup/qunit-demo-advanced Unit testing front-end JavaScript presents its own unique set of challenges. In this session we will look at number of different techniques to tackle these challenges and make our JavaScript unit tests fast and robust. We plan to cover the following subjects: * Mocking and spy techniques to avoid dependencies on - Functions, methods and constructor functions - Time (new Date()) - Timers (setTimeout, setInterval) - Ajax requests - The DOM - Events * Structuring tests for reuse and readability * Testing browser-specific behaviour * Leak testing