reuse window object for faster tests

pull/737/head
Rich Harris 8 years ago
parent 7aadbcb02d
commit c35e5948cd

@ -1,2 +1 @@
--bail
test/test.js

@ -53,9 +53,12 @@ export function tryToReadFile(file) {
}
}
const { window } = new JSDOM('<main></main>');
global.document = window.document;
export function env() {
const { window } = new JSDOM('<main></main>');
global.document = window.document;
window._svelteTransitionManager = null;
window.document.body.innerHTML = '<main></main>';
return window;
}

Loading…
Cancel
Save