honestbleeps/Reddit-Enhancement-Suite — pull request #199 by thelinmichael (2012-09-30 19:55:34+00:00)
Title: Introducing Qunit testing

QUnit is a great tool to gain confidence in that changes to the code base is working as intended, and haven't caused any unwanted side-effects. It also enables test-driven development, and a better understanding of what the code is supposed to be doing.

This commit contains tests for two of the functions that are defined by RES, so it is of course by no means complete, but a work in progress. I hope that it can be a foundation for additional tests as new functionality is added or current functionality is modified.

File structure:
tests/tests.html - Runs all tests. All tests should pass before committing.
test/test-*.js - A test for a specific test unit.
test/resources - Directory for QUnit and jQuery, referenced in tests/tests.html

TDD: http://en.wikipedia.org/wiki/Test-driven_development
QUnit: http://qunitjs.com/