mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Test decorateMarker + decorationStateForScreenRowRange
This commit is contained in:
@@ -5599,3 +5599,13 @@ describe "TextEditor", ->
|
||||
gutter.destroy()
|
||||
expect(payloads).toEqual []
|
||||
|
||||
describe "decorations", ->
|
||||
describe "::decorateMarker", ->
|
||||
it "includes the decoration in the object returned from ::decorationStateForScreenRowRange", ->
|
||||
marker = editor.markBufferRange([[2, 4], [6, 8]])
|
||||
decoration = editor.decorateMarker(marker, type: 'highlight', class: 'foo')
|
||||
expect(editor.decorationStateForScreenRowRange(0, 5)[decoration.id]).toEqual {
|
||||
properties: {type: 'highlight', class: 'foo', id: decoration.id}
|
||||
screenRange: marker.getScreenRange(),
|
||||
rangeIsReversed: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user