mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Add spec for disabling spell check of a grammar
This commit is contained in:
parent
2f8b8c4fc7
commit
1f4df2878f
@ -45,3 +45,17 @@ describe "Spell check", ->
|
||||
editor.insertText('a')
|
||||
advanceClock(editor.getBuffer().stoppedChangingDelay)
|
||||
expect(editor.find('.misspelling')).toBeHidden()
|
||||
|
||||
describe "when spell checking for a grammar is removed", ->
|
||||
it "removes all current decorations", ->
|
||||
editor.setText('notaword')
|
||||
advanceClock(editor.getBuffer().stoppedChangingDelay)
|
||||
config.set('spell-check.grammars', ['source.js'])
|
||||
|
||||
waitsFor ->
|
||||
editor.find('.misspelling').length > 0
|
||||
|
||||
runs ->
|
||||
expect(editor.find('.misspelling').length).toBe 1
|
||||
config.set('spell-check.grammars', [])
|
||||
expect(editor.find('.misspelling').length).toBe 0
|
||||
|
Loading…
Reference in New Issue
Block a user