mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
:lipstick
This commit is contained in:
parent
49be6986a0
commit
ef9bb5a259
@ -18,6 +18,14 @@ describe "Editor", ->
|
||||
editor.setBuffer(buffer)
|
||||
editor.isFocused = true
|
||||
|
||||
describe "construction", ->
|
||||
it "assigns an empty buffer and correctly handles text input (regression coverage)", ->
|
||||
editor = new Editor
|
||||
expect(editor.buffer.path).toBeUndefined()
|
||||
expect(editor.lines.find('.line').length).toBe 1
|
||||
editor.insertText('x')
|
||||
expect(editor.lines.find('.line').length).toBe 1
|
||||
|
||||
describe "text rendering", ->
|
||||
it "creates a line element for each line in the buffer with the html-escaped text of the line", ->
|
||||
expect(editor.lines.find('.line').length).toEqual(buffer.numLines())
|
||||
@ -936,14 +944,6 @@ describe "Editor", ->
|
||||
expect(editor.isFocused).toBeFalsy()
|
||||
expect(editor).not.toHaveClass('focused')
|
||||
|
||||
describe "construction", ->
|
||||
it "assigns an empty buffer and correctly handles text input (regression coverage)", ->
|
||||
editor = new Editor
|
||||
expect(editor.buffer.path).toBeUndefined()
|
||||
expect(editor.lines.find('.line').length).toBe 1
|
||||
editor.insertText('x')
|
||||
expect(editor.lines.find('.line').length).toBe 1
|
||||
|
||||
describe ".setBuffer(buffer)", ->
|
||||
it "sets the cursor to the beginning of the file", ->
|
||||
expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)
|
||||
|
Loading…
Reference in New Issue
Block a user