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:

Leave a Reply

Your email address will not be published. Required fields are marked *