Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('[console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE]: Should console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE', () => {
const restoreConsole = mockConsole();
const wrapper = mount( {}} validationOption={{ locale: 'foobar' }} />);
const $wrapper = wrapper.find(WRAPPER);
$wrapper.simulate('click');
$wrapper.simulate('blur');
expect(console.error).toHaveBeenCalled();
restoreConsole();
});
});
it('[console.error type array]: Should console.error Please provide "type" in validationOption', () => {
const restoreConsole = mockConsole();
const wrapper = mount(<textarea> {}} validationOption={{ type: 'array' }} />);
const $input = wrapper.find(INPUT);
$input.simulate('focus');
$input.simulate('blur');
expect(console.error).toHaveBeenCalled();
restoreConsole();
});
});</textarea>
it('[console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE]: Should console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE', () => {
const restoreConsole = mockConsole();
const wrapper = mount(<select> {}} validationOption={{ locale: 'foobar' }} />);
const $wrapper = wrapper.find(WRAPPER);
$wrapper.simulate('click');
$wrapper.simulate('blur');
expect(console.error).toHaveBeenCalled();
restoreConsole();
});
});</select>
it('[console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE]: Should console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE', () => {
const restoreConsole = mockConsole();
const wrapper = mount( {}} validationOption={{ locale: 'foobar' }} />);
const $input = wrapper.find(INPUT);
$input.simulate('focus');
$input.simulate('blur');
expect(console.error).toHaveBeenCalled();
restoreConsole();
});
it('[console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE]: Should console.error REACT_INPUTS_VALIDATION_CUSTOM_ERROR_MESSAGE_EXAMPLE', () => {
const restoreConsole = mockConsole();
const wrapper = mount( {}} validationOption={{ locale: 'foobar' }} />);
const $wrapper = wrapper.find(WRAPPER);
$wrapper.simulate('click');
$wrapper.simulate('blur');
expect(console.error).toHaveBeenCalled();
restoreConsole();
});
});
beforeEach(() => {
restoreConsole = mockConsole();
});
beforeEach(async () => {
restoreConsole = mockConsole()
analytics = new Analytics.Client()
Object.keys(Bridge).forEach(key => getBridgeStub(key as any).mockClear())
await analytics.setup('write key')
})
beforeAll( () => {
restoreConsole = mockConsole();
} );
beforeAll(() => {
restoreConsole = mockConsole()
})