mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
21 lines
730 B
CoffeeScript
21 lines
730 B
CoffeeScript
_ = require 'underscore'
|
|
Buffer = require 'buffer'
|
|
TokenizedBuffer = require 'tokenized-buffer'
|
|
|
|
describe "Token", ->
|
|
[editSession, token] = []
|
|
|
|
beforeEach ->
|
|
tabText = ' '
|
|
editSession = fixturesProject.buildEditSessionForPath('sample.js')
|
|
{ tokenizedBuffer } = editSession
|
|
screenLine = tokenizedBuffer.lineForScreenRow(3)
|
|
token = _.last(screenLine.tokens)
|
|
|
|
afterEach ->
|
|
editSession.destroy()
|
|
|
|
describe ".getCssClassString()", ->
|
|
it "returns a class for every scope prefix, replacing . characters in scope names with --", ->
|
|
expect(token.getCssClassString()).toBe 'source source-js punctuation punctuation-terminator punctuation-terminator-statement punctuation-terminator-statement-js'
|