mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Add test for null-guarding element during gutter decoration update
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user