@@ -2264,7 +2264,7 @@ describe "TextBuffer", ->
2264
2264
buffer .setText (' \n ' )
2265
2265
expect (buffer .isEmpty ()).toBeFalsy ()
2266
2266
2267
- describe " ::onWillChange" , ->
2267
+ describe " ::onWillChange(callback) " , ->
2268
2268
it " notifies observers before a transaction, an undo or a redo" , ->
2269
2269
changeCount = 0
2270
2270
expectedText = ' '
@@ -2301,14 +2301,14 @@ describe "TextBuffer", ->
2301
2301
buffer .revertToCheckpoint (checkpoint)
2302
2302
expect (changeCount).toBe (5 )
2303
2303
2304
- describe " ::onDidChangeText (callback)" , ->
2304
+ describe " ::onDidChange (callback)" , ->
2305
2305
beforeEach ->
2306
2306
filePath = require .resolve (' ./fixtures/sample.js' )
2307
2307
buffer = TextBuffer .loadSync (filePath)
2308
2308
2309
2309
it " notifies observers after a transaction, an undo or a redo" , ->
2310
2310
textChanges = []
2311
- buffer .onDidChangeText ({changes}) -> textChanges .push (changes... )
2311
+ buffer .onDidChange ({changes}) -> textChanges .push (changes... )
2312
2312
2313
2313
buffer .insert ([0 , 0 ], " abc" )
2314
2314
buffer .delete ([[0 , 0 ], [0 , 1 ]])
@@ -2402,12 +2402,12 @@ describe "TextBuffer", ->
2402
2402
2403
2403
it " doesn't notify observers after an empty transaction" , ->
2404
2404
didChangeTextSpy = jasmine .createSpy ()
2405
- buffer .onDidChangeText (didChangeTextSpy)
2405
+ buffer .onDidChange (didChangeTextSpy)
2406
2406
buffer .transact (-> )
2407
2407
expect (didChangeTextSpy).not .toHaveBeenCalled ()
2408
2408
2409
2409
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 ())
2411
2411
expect (-> buffer .transact (-> buffer .clearUndoStack ())).not .toThrowError ()
2412
2412
expect (didChangeTextSpy).not .toHaveBeenCalled ()
2413
2413
@@ -2476,8 +2476,8 @@ describe "TextBuffer", ->
2476
2476
])
2477
2477
done ()
2478
2478
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}) ->
2481
2481
switch changes[0 ].newText
2482
2482
when ' a'
2483
2483
buffer .insert (changes[0 ].newRange .end , ' b' )
0 commit comments