diff --git a/spec/text-editor-element-spec.js b/spec/text-editor-element-spec.js index 7cdd374a1..686b52757 100644 --- a/spec/text-editor-element-spec.js +++ b/spec/text-editor-element-spec.js @@ -77,13 +77,11 @@ describe('TextEditorElement', () => { }) describe('when the model is assigned', () => - it("adds the 'mini' attribute if .isMini() returns true on the model", function (done) { + it("adds the 'mini' attribute if .isMini() returns true on the model", async () => { const element = buildTextEditorElement() element.getModel().update({mini: true}) - atom.views.getNextUpdatePromise().then(() => { - expect(element.hasAttribute('mini')).toBe(true) - done() - }) + await atom.views.getNextUpdatePromise() + expect(element.hasAttribute('mini')).toBe(true) }) ) @@ -268,7 +266,7 @@ describe('TextEditorElement', () => { }) ) - describe('::setUpdatedSynchronously', () => + describe('::setUpdatedSynchronously', () => { it('controls whether the text editor is updated synchronously', () => { spyOn(window, 'requestAnimationFrame').andCallFake(fn => fn()) @@ -288,7 +286,7 @@ describe('TextEditorElement', () => { expect(window.requestAnimationFrame).not.toHaveBeenCalled() expect(element.textContent).toContain('goodbye') }) - ) + }) describe('::getDefaultCharacterWidth', () => { it('returns 0 before the element is attached', () => {