Tree.js, the Javascript Unit testing framework. (Some say it's the best one around.) Trust: It's an unittested unit testing framework. You can check out the tests in the test folder, and run them if you will. If you still manage to find a bug in spite all this effort, I'd love to pull your proposed test cases/asserts maybe along with the fixed code itself.