Add option to disable spellcheck

Add input-validator and tests
This commit is contained in:
Afzal Najam
2021-02-24 12:50:39 -05:00
committed by Yang
parent a732f125bb
commit 84b9418977
9 changed files with 71 additions and 9 deletions
+21
View File
@@ -103,6 +103,27 @@ describe('disable-animations validator tests', () => {
});
});
describe('disable-spellchecker validator tests', () => {
it('Throws if disable-spellchecker is not a boolean', () => {
const func = () => {
validator.checkDisableSpellchecker('yes');
};
expect(func).toThrowError(`Input for input.disable-spellchecker should be either 'true' or 'false'.`);
});
it('Validates successfully if disable-spellchecker is either true or false', () => {
const func1 = () => {
validator.checkDisableSpellchecker('true');
};
expect(func1).not.toThrow();
const func2 = () => {
validator.checkDisableSpellchecker('false');
};
expect(func2).not.toThrow();
});
});
describe('emulator-build validator tests', () => {
it('Throws if emulator-build is not a number', () => {
const func = () => {