Skip to content

Commit

Permalink
Fix two more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
damieng committed Sep 9, 2017
1 parent 0a2ff53 commit af66c5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions spec/package-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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", ->
Expand Down Expand Up @@ -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] = []
Expand Down
2 changes: 1 addition & 1 deletion spec/text-editor-registry-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af66c5e

Please sign in to comment.