         editor.trigger 'editor:move-line-down'
         expect(buffer.lineForRow(11)).toBe '};'
         expect(buffer.lineForRow(12)).toBe '  return sort(Array.apply(this, arguments));'
-        expect(buffer.lineForRow(13)).toBeUndefined()
+        expect(buffer.lineForRow(13)).toBeNull()
 
     describe "when the cursor is on the second to last line and the last line is empty", ->
       it "does not move the line", ->

          editor.trigger 'editor:duplicate-line'
          expect(buffer.lineForRow(12)).toBe '};'
          expect(buffer.lineForRow(13)).toBe '};'
          expect(buffer.lineForRow(14)).toBeUndefined()
          expect(editor.getCursorBufferPosition()).toEqual [13, 2]

      describe "when the cursor in on the last line and it is only a newline", ->

          editor.trigger 'editor:duplicate-line'
          expect(buffer.lineForRow(13)).toBe ''
          expect(buffer.lineForRow(14)).toBe ''
          expect(buffer.lineForRow(15)).toBeNull()
          expect(editor.getCursorBufferPosition()).toEqual [14, 0]

      describe "when the cursor is on the second to last line and the last line only a newline", ->
