Remove dom dependency for js in TestRunner

This patch enables tests to be run via command line in node.js.