The introduction to QUnit over at netTuts.com spawns an interesting exchange (never resolved) over how to apply unit tests against actions that manipulate the DOM. The following
Surely what you actually care about is that the val method gets called on the return value of $(“input#ResultTestBox”)—you don't need to test the functionality of the jQuery method itself. Why not inject a mock implementation of the jQuery object and test against that?