JavaScript unit test integration for headless browsers