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 test/test.js

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

Loading…
Cancel
Save