mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
💄
This commit is contained in:
@@ -23,7 +23,7 @@ describe 'Buffer', ->
|
||||
buffer = new Buffer null
|
||||
expect(buffer.getText()).toBe ""
|
||||
|
||||
describe "save", ->
|
||||
describe ".save()", ->
|
||||
describe "when the buffer has a url", ->
|
||||
filePath = null
|
||||
|
||||
@@ -45,7 +45,7 @@ describe 'Buffer', ->
|
||||
buffer = new Buffer
|
||||
expect(-> buffer.save()).toThrow()
|
||||
|
||||
describe "getMode", ->
|
||||
describe ".getMode()", ->
|
||||
describe "when given a url", ->
|
||||
it "sets 'mode' based on the file extension", ->
|
||||
buffer = new Buffer 'something.js'
|
||||
@@ -58,3 +58,4 @@ describe 'Buffer', ->
|
||||
it "sets 'mode' to text mode", ->
|
||||
buffer = new Buffer null
|
||||
expect(buffer.getMode().name).toBe 'text'
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ describe "Editor", ->
|
||||
expect(editor.buffer).toBeDefined()
|
||||
|
||||
describe '.set/getCursor', ->
|
||||
it "moves the cursor", ->
|
||||
it "gets the cursor location / moves the cursor location", ->
|
||||
editor.buffer.setText("012345")
|
||||
expect(editor.getCursor()).toEqual {column: 6, row: 0}
|
||||
editor.setCursor(column: 2, row: 0)
|
||||
|
||||
@@ -64,14 +64,14 @@ describe "VimMode", ->
|
||||
editor.setCursor(column: 1, row: 1)
|
||||
|
||||
describe "the h keybinding", ->
|
||||
it "move the cursor left", ->
|
||||
it "moves the cursor left, but not to the previous line", ->
|
||||
editor.trigger keydownEvent('h')
|
||||
expect(editor.getCursor()).toEqual(column: 0, row: 1)
|
||||
editor.trigger keydownEvent('h')
|
||||
expect(editor.getCursor()).toEqual(column: 0, row: 1)
|
||||
|
||||
describe "the j keybinding", ->
|
||||
it "move the cursor up", ->
|
||||
it "moves the cursor up, but not to the beginning of the first line", ->
|
||||
editor.trigger keydownEvent('j')
|
||||
expect(editor.getCursor()).toEqual(column: 1, row: 0)
|
||||
editor.trigger keydownEvent('j')
|
||||
|
||||
Reference in New Issue
Block a user