mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add spec for all whitespace lines
This commit is contained in:
@@ -211,6 +211,18 @@ describe "EditorComponent", ->
|
||||
expect(leafNodes[0].classList.contains('leading-whitespace')).toBe true
|
||||
|
||||
it "applies .trailing-whitespace for lines with trailing spaces and/or tabs", ->
|
||||
editor.setText(' ')
|
||||
nextAnimationFrame()
|
||||
|
||||
leafNodes = getLeafNodes(component.lineNodeForScreenRow(0))
|
||||
expect(leafNodes[0].classList.contains('trailing-whitespace')).toBe true
|
||||
|
||||
editor.setText('\t')
|
||||
nextAnimationFrame()
|
||||
|
||||
leafNodes = getLeafNodes(component.lineNodeForScreenRow(0))
|
||||
expect(leafNodes[0].classList.contains('trailing-whitespace')).toBe true
|
||||
|
||||
editor.setText('a ')
|
||||
nextAnimationFrame()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user