From 997529774ca50ca4fa8af0221b60575a2a13fff8 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 8 Jul 2014 11:55:50 -0600 Subject: [PATCH] Clean up after stylesheet applications in editor-component-spec --- spec/editor-component-spec.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 5421f1f8f..513b92fae 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -610,6 +610,8 @@ describe "EditorComponent", -> expect(cursorRect.left).toBe rangeRect.left expect(cursorRect.width).toBe rangeRect.width + atom.themes.removeStylesheet('test') + it "sets the cursor to the default character width at the end of a line", -> editor.setCursorScreenPosition([0, Infinity]) runSetImmediateCallbacks() @@ -1838,6 +1840,9 @@ describe "EditorComponent", -> expect(cursorLeft).toBe line0Right describe "when stylesheets change while the editor is hidden", -> + afterEach -> + atom.themes.removeStylesheet('test') + it "does not re-measure character widths until the editor is shown again", -> atom.config.set('editor.fontFamily', 'sans-serif')