Add spec for all whitespace lines

This commit is contained in:
Kevin Sawicki
2014-09-17 09:47:40 -07:00
parent 18f54e6780
commit 348f865cab

View File

@@ -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()