From dc73841673cfdd1a4314775b34f7df6879e33a3b Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 13 Jul 2017 14:37:58 -0600 Subject: [PATCH] Add test for null-guarding element during gutter decoration update --- spec/text-editor-component-spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/text-editor-component-spec.js b/spec/text-editor-component-spec.js index 2028ae8bd..7a4608872 100644 --- a/spec/text-editor-component-spec.js +++ b/spec/text-editor-component-spec.js @@ -1762,13 +1762,13 @@ describe('TextEditorComponent', () => { expect(decorationNode3.firstChild).toBe(decorationElement2) decoration1.setProperties({type: 'gutter', gutterName: 'a', class: 'c', item: decorationElement1}) - decoration2.setProperties({type: 'gutter', gutterName: 'a', item: decorationElement2}) + decoration2.setProperties({type: 'gutter', gutterName: 'a'}) decoration3.destroy() await component.getNextUpdatePromise() expect(decorationNode1.className).toBe('decoration c') expect(decorationNode1.firstChild).toBe(decorationElement1) expect(decorationNode2.className).toBe('decoration') - expect(decorationNode2.firstChild).toBe(decorationElement2) + expect(decorationNode2.firstChild).toBeNull() expect(gutterB.getElement().firstChild.children.length).toBe(0) }) })