mirror of
https://github.com/atom/atom.git
synced 2026-02-13 16:14:59 -05:00
Use fake document & window in atom environment serialization spec
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user