Advanced QUnit - Front-End JavaScript Unit Testing
Published: 2013-11-14 by Lars testingUI
A couple of months ago I linked to a presentation on advanced unit testing techniques for front-end JavaScript using Jasmine. This week I did a presentation for a client using QUnit instead, covering roughly the same 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 detection
You can look at the code and watch the slides: