functional tests, unless a whole lot of mock objects are introduced, which isn't entirely out of the question). Uses JsUnit, which is included in this commit.