add Russian language in the list available for spellcheck (#1375)

This commit is contained in:
Eugeny Fomin
2020-10-02 01:34:42 +03:00
committed by GitHub
parent 34af973316
commit f06a498134
6 changed files with 31 additions and 5 deletions

View File

@@ -33,6 +33,9 @@ describe('main/Spellchecker.js', function() {
SpellChecker.getSpellCheckerLocale('it').should.equal('it-IT');
SpellChecker.getSpellCheckerLocale('it-IT').should.equal('it-IT');
SpellChecker.getSpellCheckerLocale('ru').should.equal('ru-RU');
SpellChecker.getSpellCheckerLocale('ru-RU').should.equal('ru-RU');
});
});
@@ -112,6 +115,25 @@ describe('main/Spellchecker.js', function() {
});
});
describe('ru-RU', function() {
let spellchecker = null;
before(function(done) {
spellchecker = new SpellChecker(
'ru-RU',
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;