mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-06 06:28:33 +03:00
2379b3803f
This reverts commit 7cb0bc3bc2
.
20 lines
812 B
CoffeeScript
20 lines
812 B
CoffeeScript
describe "TokenizedLine", ->
|
|
editor = null
|
|
|
|
beforeEach ->
|
|
waitsForPromise -> atom.packages.activatePackage('language-coffee-script')
|
|
|
|
describe "::isOnlyWhitespace()", ->
|
|
beforeEach ->
|
|
waitsForPromise ->
|
|
atom.project.open('coffee.coffee').then (o) -> editor = o
|
|
|
|
it "returns true when the line is only whitespace", ->
|
|
expect(editor.tokenizedLineForScreenRow(3).isOnlyWhitespace()).toBe true
|
|
expect(editor.tokenizedLineForScreenRow(7).isOnlyWhitespace()).toBe true
|
|
expect(editor.tokenizedLineForScreenRow(23).isOnlyWhitespace()).toBe true
|
|
|
|
it "returns false when the line is not only whitespace", ->
|
|
expect(editor.tokenizedLineForScreenRow(0).isOnlyWhitespace()).toBe false
|
|
expect(editor.tokenizedLineForScreenRow(2).isOnlyWhitespace()).toBe false
|