A test whose code names DOM types only as types (`el: Element`, `as HTMLElement`, `Array<Node>`) runs in Node, where the rest of its code (node:fs) runs: types are erased, so they don't need a browser.
A test reaching code that writes a browser function's source into a file (`${lazyImages}`) runs in Node, where the rest of its code (node:fs) runs: writing the function out doesn't run it. A test that does call a browser function runs in Chrome, and when it can't load there it says what put it there.