Fix two more tests

This commit is contained in:
Damien Guard
2017-09-06 14:52:08 -07:00
parent 0a2ff530ff
commit af66c5efaa
2 changed files with 7 additions and 4 deletions

View File

@@ -138,7 +138,8 @@ describe "Package", ->
jasmine.attachToDOM(editorElement)
afterEach ->
theme.deactivate() if theme?
waitsForPromise ->
theme.deactivate() if theme?
describe "when the theme contains a single style file", ->
it "loads and applies css", ->
@@ -200,8 +201,10 @@ describe "Package", ->
it "deactivated event fires on .deactivate()", ->
theme.onDidDeactivate spy = jasmine.createSpy()
theme.deactivate()
expect(spy).toHaveBeenCalled()
waitsForPromise ->
theme.deactivate()
runs ->
expect(spy).toHaveBeenCalled()
describe ".loadMetadata()", ->
[packagePath, metadata] = []

View File

@@ -685,7 +685,7 @@ describe('TextEditorRegistry', function () {
registry.setGrammarOverride(editor, 'source.c')
registry.setGrammarOverride(editor2, 'source.js')
atom.packages.deactivatePackage('language-javascript')
await atom.packages.deactivatePackage('language-javascript')
const editorCopy = TextEditor.deserialize(editor.serialize(), atom)
const editor2Copy = TextEditor.deserialize(editor2.serialize(), atom)