window
window copied to clipboard
fetch not available
related to: https://github.com/lukechilds/browser-env/issues/82
According to fetch spec, it's available under WindowOrWorkerGlobalScope.
related: https://github.com/jsdom/jsdom/issues/1724
This is still a problem, e.g. when adding the window module to an ava test setup:
const Window = require('window');
global.window = new Window();
and in package.json
"ava": {
"require": ["./test/_window.js"]
}