Fix specs for Editor View

This commit is contained in:
probablycorey
2014-02-10 15:39:20 -08:00
parent 1f3ea76379
commit 1d4cab404d

View File

@@ -10,8 +10,6 @@ describe "EditorView", ->
[buffer, editorView, editor, cachedLineHeight, cachedCharWidth] = []
beforeEach ->
atom.packages.activatePackage('language-text', sync: true)
atom.packages.activatePackage('language-javascript', sync: true)
editor = atom.project.openSync('sample.js')
buffer = editor.buffer
editorView = new EditorView(editor)
@@ -26,6 +24,12 @@ describe "EditorView", ->
@width(getCharWidth() * widthInChars) if widthInChars
$('#jasmine-content').append(this)
waitsForPromise ->
atom.packages.activatePackage('language-text', sync: true)
waitsForPromise ->
atom.packages.activatePackage('language-javascript', sync: true)
getLineHeight = ->
return cachedLineHeight if cachedLineHeight?
calcDimensions()