mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make spec more comprehensive
This commit is contained in:
@@ -2289,7 +2289,7 @@ describe "TextEditorPresenter", ->
|
||||
presenter.setBlockDecorationDimensions(blockDecoration1, 0, 20)
|
||||
expect(stateForBlockDecoration(presenter, blockDecoration1)).toBeUndefined()
|
||||
|
||||
it "contains state for block decorations, indicating the screen row they belong to both initially and when their markers move", ->
|
||||
it "contains state for on-screen and unmeasured block decorations, both initially and when they are updated or destroyed", ->
|
||||
item = {}
|
||||
blockDecoration1 = addBlockDecorationForScreenRow(0, item)
|
||||
blockDecoration2 = addBlockDecorationForScreenRow(4, item)
|
||||
@@ -2375,6 +2375,17 @@ describe "TextEditorPresenter", ->
|
||||
isVisible: true
|
||||
}
|
||||
|
||||
blockDecoration1.destroy()
|
||||
|
||||
expect(stateForBlockDecoration(presenter, blockDecoration1)).toBeUndefined()
|
||||
expect(stateForBlockDecoration(presenter, blockDecoration2)).toBeUndefined()
|
||||
expect(stateForBlockDecoration(presenter, blockDecoration3)).toBeUndefined()
|
||||
expectValues stateForBlockDecoration(presenter, blockDecoration4), {
|
||||
decoration: blockDecoration4
|
||||
screenRow: 10
|
||||
isVisible: true
|
||||
}
|
||||
|
||||
it "doesn't throw an error when setting the dimensions for a destroyed decoration", ->
|
||||
blockDecoration = addBlockDecorationForScreenRow(0)
|
||||
presenter = buildPresenter()
|
||||
|
||||
Reference in New Issue
Block a user