From 47a4450f7c41c3393272660c52bc0be1252e9fff Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 17 Oct 2019 12:22:52 -0400 Subject: [PATCH] Reset the document at the end of the test --- test/can-dom-mutate-test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/can-dom-mutate-test.js b/test/can-dom-mutate-test.js index aef5fdb..dfee6c7 100644 --- a/test/can-dom-mutate-test.js +++ b/test/can-dom-mutate-test.js @@ -304,11 +304,14 @@ function mutationObserverTests() { }); test("Works with no document", function(assert) { + var lastDoc = globals.getKeyValue("document"); try { globals.setKeyValue("document", null); assert.ok(true, "Able to set the document to null like happens in SSR"); } catch(e) { assert.ok(false, e.message); + } finally { + globals.setKeyValue("document", lastDoc); } }); }