feat(spellcheck): add Ukrainian language for spellcheck (#1382)
This commit is contained in:
@@ -36,6 +36,9 @@ describe('main/Spellchecker.js', function() {
|
||||
|
||||
SpellChecker.getSpellCheckerLocale('ru').should.equal('ru-RU');
|
||||
SpellChecker.getSpellCheckerLocale('ru-RU').should.equal('ru-RU');
|
||||
|
||||
SpellChecker.getSpellCheckerLocale('uk').should.equal('uk-UA');
|
||||
SpellChecker.getSpellCheckerLocale('uk-UA').should.equal('uk-UA');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -134,6 +137,25 @@ describe('main/Spellchecker.js', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('uk-UA', function() {
|
||||
let spellchecker = null;
|
||||
|
||||
before(function(done) {
|
||||
spellchecker = new SpellChecker(
|
||||
'uk-UA',
|
||||
path.resolve(__dirname, '../../src/node_modules/simple-spellchecker/dict'),
|
||||
done
|
||||
);
|
||||
});
|
||||
|
||||
it('should spellcheck', function() {
|
||||
spellchecker.spellCheck('українська').should.equal(true);
|
||||
});
|
||||
it('should give suggestions', function() {
|
||||
spellchecker.getSuggestions('украінська', 1).length.should.be.equal(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('de-DE', function() {
|
||||
let spellchecker = null;
|
||||
|
||||
|
Reference in New Issue
Block a user