During a test, I am using zombie.js to load a page from a local express server. However, the page contains a script element that makes a call to Google Analytics. I want to prevent this external script from loading while allowing other local scripts to run smoothly.
I am aware of the { runScripts : false }
option with browser.visit()
, but this prevents all scripts on the page from loading, not just those from external hosts. Is there a way to achieve what I need?