mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Avoid deprecation warnings in spec
This commit is contained in:
@@ -4271,6 +4271,8 @@ describe "TextEditor", ->
|
||||
marker = editor.markBufferRange([[1, 0], [1, 0]])
|
||||
|
||||
it "casts 'gutter' type to 'line-number' unless a gutter name is specified.", ->
|
||||
jasmine.snapshotDeprecations()
|
||||
|
||||
lineNumberDecoration = editor.decorateMarker(marker, {type: 'gutter'})
|
||||
customGutterDecoration = editor.decorateMarker(marker, {type: 'gutter', gutterName: 'custom'})
|
||||
expect(lineNumberDecoration.getProperties().type).toBe 'line-number'
|
||||
@@ -4278,6 +4280,8 @@ describe "TextEditor", ->
|
||||
expect(customGutterDecoration.getProperties().type).toBe 'gutter'
|
||||
expect(customGutterDecoration.getProperties().gutterName).toBe 'custom'
|
||||
|
||||
jasmine.restoreDeprecationsSnapshot()
|
||||
|
||||
it 'reflects an added decoration when one of its custom gutters is decorated.', ->
|
||||
gutter = editor.addGutter {'name': 'custom-gutter'}
|
||||
decoration = gutter.decorateMarker marker, {class: 'custom-class'}
|
||||
|
||||
Reference in New Issue
Block a user