Skip to content

Commit

Permalink
Merge pull request #71 from canjs/reset
Browse files Browse the repository at this point in the history
Reset the document at the end of the test
  • Loading branch information
matthewp authored Oct 17, 2019
2 parents 3f1a981 + 47a4450 commit 2a16043
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/can-dom-mutate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
}
Expand Down

0 comments on commit 2a16043

Please sign in to comment.