Support for headless testing

Need  a poller in the test suite to tell the JS test runner that all tests
have completed