diff --git a/spec/atom/vim-mode-spec.coffee b/spec/atom/vim-mode-spec.coffee index 1e007e39a..ddb9c2ce3 100644 --- a/spec/atom/vim-mode-spec.coffee +++ b/spec/atom/vim-mode-spec.coffee @@ -90,13 +90,20 @@ describe "VimMode", -> editor.trigger keydownEvent('h') expect(editor.getPosition()).toEqual(column: 0, row: 1) - describe "the j keybinding", -> + describe "the k keybinding", -> it "moves the cursor up, but not to the beginning of the first line", -> - editor.trigger keydownEvent('j') + editor.trigger keydownEvent('k') expect(editor.getPosition()).toEqual(column: 1, row: 0) - editor.trigger keydownEvent('j') + editor.trigger keydownEvent('k') expect(editor.getPosition()).toEqual(column: 1, row: 0) + describe "the j keybinding", -> + it "moves the cursor down, but not to the end of the last line", -> + editor.trigger keydownEvent 'j' + expect(editor.getPosition()).toEqual(column: 1, row: 2) + editor.trigger keydownEvent 'j' + expect(editor.getPosition()).toEqual(column: 1, row: 2) + describe "the w keybinding", -> it "moves the cursor to the beginning of the next word", -> editor.buffer.setText("ab cde1+- \n xyz\n\nzip")