An in memory document is created using `createHTMLDocument`. The script is
appended to this in memory dom using appendChild, then moved to real DOM
also using appendChild.
open console
verify console.log script is in DOM
if script is executed you will see `script has ran`