mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-08 16:19:17 +03:00
Fix spec
This commit is contained in:
parent
f2d480fc72
commit
841412bd01
@ -3051,16 +3051,12 @@ describe "TextEditor", ->
|
|||||||
atom.packages.deactivatePackages()
|
atom.packages.deactivatePackages()
|
||||||
atom.packages.unloadPackages()
|
atom.packages.unloadPackages()
|
||||||
|
|
||||||
it 'will return correct values based on the scope of the set grammars', ->
|
it 'returns correct values based on the scope of the set grammars', ->
|
||||||
atom.config.set '.source.coffee', 'editor.tabLength', 6
|
atom.config.set '.source.coffee', 'editor.tabLength', 6
|
||||||
atom.config.set '.source.coffee .class', 'editor.tabLength', 4
|
|
||||||
|
|
||||||
expect(editor.getTabLength()).toBe 2
|
expect(editor.getTabLength()).toBe 2
|
||||||
expect(coffeeEditor.getTabLength()).toBe 6
|
expect(coffeeEditor.getTabLength()).toBe 6
|
||||||
|
|
||||||
coffeeEditor.setCursorBufferPosition [0, 10]
|
|
||||||
expect(coffeeEditor.getTabLength(coffeeEditor.scopesAtCursor())).toBe 4
|
|
||||||
|
|
||||||
it 'retokenizes when the tab length is updated via .setTabLength()', ->
|
it 'retokenizes when the tab length is updated via .setTabLength()', ->
|
||||||
expect(editor.getTabLength()).toBe 2
|
expect(editor.getTabLength()).toBe 2
|
||||||
expect(editor.tokenizedLineForScreenRow(5).tokens[0].firstNonWhitespaceIndex).toBe 2
|
expect(editor.tokenizedLineForScreenRow(5).tokens[0].firstNonWhitespaceIndex).toBe 2
|
||||||
|
Loading…
Reference in New Issue
Block a user