diff --git a/spec/atom-environment-spec.coffee b/spec/atom-environment-spec.coffee index 937b2b241..fa8c3cc5d 100644 --- a/spec/atom-environment-spec.coffee +++ b/spec/atom-environment-spec.coffee @@ -268,7 +268,17 @@ describe "AtomEnvironment", -> runs -> atom.textEditors.setGrammarOverride(editor, 'text.plain') - atom2 = new AtomEnvironment(atom) + atom2 = new AtomEnvironment({ + applicationDelegate: atom.applicationDelegate, + window: document.createElement('div'), + document: Object.assign( + document.createElement('div'), + { + body: document.createElement('div'), + head: document.createElement('div'), + } + ) + }) atom2.deserialize(atom.serialize()) expect(atom2.textEditors.getGrammarOverride(editor)).toBe('text.plain')