Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Prevent text from leaving fixture modified
Browse files Browse the repository at this point in the history
  • Loading branch information
damieng committed Nov 30, 2016
1 parent eac4f04 commit 9e5353a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/pane-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ describe "Pane", ->
expect(eventCount).toBe 1

it "only calls terminate handler once when text is modified twice", ->
originalText = editor1.getText()
editor1.insertText('Some text')
advanceClock(editor1.getBuffer().stoppedChangingDelay)

Expand All @@ -1091,6 +1092,10 @@ describe "Pane", ->
expect(pane.getPendingItem()).toBeNull()
expect(eventCount).toBe 1

# Reset fixture back to original state
editor1.setText(originalText)
editor1.save()

it "only calls clearPendingItem if there is a pending item to clear", ->
spyOn(pane, "clearPendingItem").andCallThrough()

Expand Down

0 comments on commit 9e5353a

Please sign in to comment.