diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 7ae9765eb..e7e6ccf68 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -2,7 +2,7 @@ ReactEditorView = require '../src/react-editor-view' nbsp = String.fromCharCode(160) -describe "EditorComponent", -> +fdescribe "EditorComponent", -> [editor, wrapperView, component, node, verticalScrollbarNode, horizontalScrollbarNode] = [] [lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame] = [] @@ -22,7 +22,10 @@ describe "EditorComponent", -> else fn() - editor = atom.project.openSync('sample.js') + waitsForPromise -> + atom.project.open('sample.js').then (o) -> editor = o + + runs -> wrapperView = new ReactEditorView(editor) wrapperView.attachToDom() {component} = wrapperView diff --git a/spec/tokenized-line-spec.coffee b/spec/tokenized-line-spec.coffee index 9e017c9ec..cd0e1e497 100644 --- a/spec/tokenized-line-spec.coffee +++ b/spec/tokenized-line-spec.coffee @@ -6,7 +6,7 @@ describe "TokenizedLine", -> describe "::getScopeTree()", -> it "returns a tree whose inner nodes are scopes and whose leaf nodes are tokens in those scopes", -> - editor = atom.project.openSync('coffee.coffee') + editor = null ensureValidScopeTree = (scopeTree, scopes=[]) -> if scopeTree.children? @@ -16,7 +16,11 @@ describe "TokenizedLine", -> expect(scopeTree).toBe tokens[tokenIndex++] expect(scopes).toEqual scopeTree.scopes - tokenIndex = 0 - tokens = editor.lineForScreenRow(1).tokens - scopeTree = editor.lineForScreenRow(1).getScopeTree() - ensureValidScopeTree(scopeTree) + waitsForPromise -> + atom.project.open('coffee.coffee').then (o) -> editor = o + + runs -> + tokenIndex = 0 + tokens = editor.lineForScreenRow(1).tokens + scopeTree = editor.lineForScreenRow(1).getScopeTree() + ensureValidScopeTree(scopeTree)