Init test case component

This commit is contained in:
2023-11-21 14:47:25 +07:00
parent 4aae26e994
commit 04ef95754c
20 changed files with 439 additions and 8 deletions
@@ -0,0 +1,33 @@
import renderer from 'react-test-renderer';
import Select from '.';
describe('Select testing snapshot', () => {
const options = [
{
label: 'Option 1',
value: 'Value 1',
},
{
label: 'Option 2',
value: 'Value 2'
}
];
const value = 'Temp value';
const handleOnChange = () => {
console.log('On change');
}
const wrapper = renderer.create(
<Select
options={options}
value={value}
onChange={handleOnChange}
ariaLabel="Sort"
/>
);
test('render', () => {
expect(wrapper).toMatchSnapshot();
});
});