added qunit tests and associated test framework