mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Include SpacePen wrapper view in spec
During the transition to React, it will be easier if the EditorComponent assumes it's rendered inside the ReactEditorView. This will make it easier to test compatibility with existing editor APIs.
This commit is contained in:
parent
022f5ca219
commit
59709a92ba
@ -1,9 +1,8 @@
|
||||
React = require 'react'
|
||||
{extend, flatten, toArray} = require 'underscore-plus'
|
||||
EditorComponent = require '../src/editor-component'
|
||||
ReactEditorView = require '../src/react-editor-view'
|
||||
|
||||
fdescribe "EditorComponent", ->
|
||||
[editor, component, node, lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame] = []
|
||||
describe "EditorComponent", ->
|
||||
[editor, wrapperView, component, node, lineHeightInPixels, charWidth, delayAnimationFrames, nextAnimationFrame] = []
|
||||
|
||||
beforeEach ->
|
||||
waitsForPromise ->
|
||||
@ -19,8 +18,9 @@ fdescribe "EditorComponent", ->
|
||||
fn()
|
||||
|
||||
editor = atom.project.openSync('sample.js')
|
||||
container = document.querySelector('#jasmine-content')
|
||||
component = React.renderComponent(EditorComponent({editor}), container)
|
||||
wrapperView = new ReactEditorView(editor)
|
||||
wrapperView.attachToDom()
|
||||
{component} = wrapperView
|
||||
component.setLineHeight(1.3)
|
||||
component.setFontSize(20)
|
||||
{lineHeightInPixels, charWidth} = component.measureLineDimensions()
|
||||
|
Loading…
Reference in New Issue
Block a user