update test to work in the browser (without process.on("exit")