mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Fix two more tests
This commit is contained in:
@@ -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] = []
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user