Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 15ade70

Browse files
committed
Update onDidChangeText -> onDidChange in some specs
1 parent e9d084f commit 15ade70

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/text-buffer-spec.coffee

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ describe "TextBuffer", ->
22642264
buffer.setText('\n')
22652265
expect(buffer.isEmpty()).toBeFalsy()
22662266

2267-
describe "::onWillChange", ->
2267+
describe "::onWillChange(callback)", ->
22682268
it "notifies observers before a transaction, an undo or a redo", ->
22692269
changeCount = 0
22702270
expectedText = ''
@@ -2301,14 +2301,14 @@ describe "TextBuffer", ->
23012301
buffer.revertToCheckpoint(checkpoint)
23022302
expect(changeCount).toBe(5)
23032303

2304-
describe "::onDidChangeText(callback)", ->
2304+
describe "::onDidChange(callback)", ->
23052305
beforeEach ->
23062306
filePath = require.resolve('./fixtures/sample.js')
23072307
buffer = TextBuffer.loadSync(filePath)
23082308

23092309
it "notifies observers after a transaction, an undo or a redo", ->
23102310
textChanges = []
2311-
buffer.onDidChangeText ({changes}) -> textChanges.push(changes...)
2311+
buffer.onDidChange ({changes}) -> textChanges.push(changes...)
23122312

23132313
buffer.insert([0, 0], "abc")
23142314
buffer.delete([[0, 0], [0, 1]])
@@ -2402,12 +2402,12 @@ describe "TextBuffer", ->
24022402

24032403
it "doesn't notify observers after an empty transaction", ->
24042404
didChangeTextSpy = jasmine.createSpy()
2405-
buffer.onDidChangeText(didChangeTextSpy)
2405+
buffer.onDidChange(didChangeTextSpy)
24062406
buffer.transact(->)
24072407
expect(didChangeTextSpy).not.toHaveBeenCalled()
24082408

24092409
it "doesn't throw an error when clearing the undo stack within a transaction", ->
2410-
buffer.onDidChangeText(didChangeTextSpy = jasmine.createSpy())
2410+
buffer.onDidChange(didChangeTextSpy = jasmine.createSpy())
24112411
expect(-> buffer.transact(-> buffer.clearUndoStack())).not.toThrowError()
24122412
expect(didChangeTextSpy).not.toHaveBeenCalled()
24132413

@@ -2476,8 +2476,8 @@ describe "TextBuffer", ->
24762476
])
24772477
done()
24782478

2479-
it "provides the correct changes when the buffer is mutated in the onDidChangeText callback", (done) ->
2480-
buffer.onDidChangeText ({changes}) ->
2479+
it "provides the correct changes when the buffer is mutated in the onDidChange callback", (done) ->
2480+
buffer.onDidChange ({changes}) ->
24812481
switch changes[0].newText
24822482
when 'a'
24832483
buffer.insert(changes[0].newRange.end, 'b')

0 commit comments

Comments
 (0)