This commit is contained in:
Ben Ogle 2014-10-07 17:54:31 -07:00
parent f2d480fc72
commit 841412bd01

View File

@ -3051,16 +3051,12 @@ describe "TextEditor", ->
atom.packages.deactivatePackages()
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 .class', 'editor.tabLength', 4
expect(editor.getTabLength()).toBe 2
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()', ->
expect(editor.getTabLength()).toBe 2
expect(editor.tokenizedLineForScreenRow(5).tokens[0].firstNonWhitespaceIndex).toBe 2