add Russian language in the list available for spellcheck (#1375)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user