From 9b70066bed3e9874e719c9af352e2b245e3fdb49 Mon Sep 17 00:00:00 2001 From: Wliu Date: Wed, 4 May 2016 17:28:15 -0400 Subject: [PATCH] Fix TokenizedBuffer specs? --- spec/tokenized-buffer-spec.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/tokenized-buffer-spec.coffee b/spec/tokenized-buffer-spec.coffee index ee418a386..d11c93213 100644 --- a/spec/tokenized-buffer-spec.coffee +++ b/spec/tokenized-buffer-spec.coffee @@ -187,9 +187,9 @@ describe "TokenizedBuffer", -> buffer.delete([[1, 0], [3, 0]]) changeHandler.reset() - expect(tokenizedBuffer.firstInvalidRow()).toBe 3 + expect(tokenizedBuffer.firstInvalidRow()).toBe 2 advanceClock() - expect(changeHandler).toHaveBeenCalledWith(start: 3, end: 7, delta: 0) + expect(changeHandler).toHaveBeenCalledWith(start: 2, end: 6, delta: 0) describe "when the change invalidates all the lines before the current invalid region", -> it "retokenizes the invalidated lines and continues into the valid region", -> @@ -259,7 +259,7 @@ describe "TokenizedBuffer", -> expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] delete event.bufferChange - expect(event).toEqual(start: 3, end: 5, delta: 0) + expect(event).toEqual(start: 3, end: 7, delta: 0) it "resumes highlighting with the state of the previous line", -> buffer.insert([0, 0], '/*') @@ -309,7 +309,7 @@ describe "TokenizedBuffer", -> expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] delete event.bufferChange - expect(event).toEqual(start: 3, end: 4, delta: 0) + expect(event).toEqual(start: 3, end: 7, delta: 0) describe "when lines are both updated and inserted", -> it "updates tokens to reflect the change", -> @@ -360,7 +360,7 @@ describe "TokenizedBuffer", -> expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] delete event.bufferChange - expect(event).toEqual(start: 5, end: 7, delta: 0) + expect(event).toEqual(start: 5, end: 9, delta: 0) describe "when there is an insertion that is larger than the chunk size", -> it "tokenizes the initial chunk synchronously, then tokenizes the remaining lines in the background", ->