Skip to content

Commit

Permalink
Merge pull request #3 from rakista112/master
Browse files Browse the repository at this point in the history
specs for the one transaction feature
  • Loading branch information
faroit committed May 1, 2016
2 parents 92c5da7 + cc566b3 commit 1ba04d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/swap-selection-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ describe "SwapSelection", ->

swapSelection ->
expect(editor.getText()).toBe 'one two three'

it "does it all in one transaction", ->
expected = 'two one three'

editor.setText expected
# selecting "one" "two"
editor.setSelectedBufferRanges([[[0, 0], [0, 3]], [[0, 4], [0, 7]]])

swapSelection ->
editor.undo()
expect(editor.getText()).toBe expected

0 comments on commit 1ba04d8

Please sign in to comment.