From ea5500a124945b06fc9ca70f6924f860e097643e Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 22 Feb 2016 16:31:06 -0800 Subject: [PATCH 1/2] Print line number of wait timeout in presenter spec --- spec/text-editor-presenter-spec.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index 57c674033..543f8349d 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -91,7 +91,9 @@ describe "TextEditorPresenter", -> expectNoStateUpdate = (presenter, fn) -> expectStateUpdatedToBe(false, presenter, fn) waitsForStateToUpdate = (presenter, fn) -> - waitsFor "presenter state to update", 1000, (done) -> + line = new Error().stack.split('\n')[2].split(':')[1] + + waitsFor "presenter state to update at line #{line}", 1000, (done) -> disposable = presenter.onDidUpdateState -> disposable.dispose() process.nextTick(done) From 98559f5d342a5a7e37ab6108ae747eab893cf9c9 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 22 Feb 2016 16:31:17 -0800 Subject: [PATCH 2/2] Add missing --- spec/text-editor-presenter-spec.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index 543f8349d..05ac87c0c 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -1340,7 +1340,9 @@ describe "TextEditorPresenter", -> blockDecoration3 = addBlockDecorationBeforeScreenRow(7) blockDecoration4 = null - waitsForStateToUpdate presenter, blockDecoration4 = addBlockDecorationAfterScreenRow(7) + waitsForStateToUpdate presenter, -> + blockDecoration4 = addBlockDecorationAfterScreenRow(7) + runs -> expect(lineStateForScreenRow(presenter, 0).precedingBlockDecorations).toEqual([blockDecoration1]) expect(lineStateForScreenRow(presenter, 0).followingBlockDecorations).toEqual([])