mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-08-31 17:49:33 +00:00
Add option to disable spellcheck
Add input-validator and tests
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user