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,10 +53,13 @@ export function tryToReadFile(file) {
} }
} }
export function env() {
const { window } = new JSDOM('<main></main>'); const { window } = new JSDOM('<main></main>');
global.document = window.document; global.document = window.document;
export function env() {
window._svelteTransitionManager = null;
window.document.body.innerHTML = '<main></main>';
return window; return window;
} }

Loading…
Cancel
Save