enable spellchecker via config for test

This commit is contained in:
simplyahmazing
2017-12-11 16:34:23 -05:00
parent 36342145da
commit 6b51f6d9a6

View File

@@ -1,8 +1,12 @@
const ConfigUtil = require('js/utils/config-util.js');
const SetupSpellChecker = require('js/spellchecker')
describe('test spell checker', function () {
SetupSpellChecker.init(true)
ConfigUtil.setConfigItem('enableSpellchecker', true);
SetupSpellChecker.init() // re-initialize after setting update
const spellCheckHandler = SetupSpellChecker.SpellCheckHandler
it('mark misspelled word', function () {
expect(spellCheckHandler.isMisspelled('helpe')).toBe(true)
})