Singleprocess emulator

avoid to spawn a different node process to run the headless browser; fix test suite