Add QUnit test, move tests to test directory