Update code and message test case

This commit is contained in:
2023-11-26 13:39:11 +07:00
parent a05ec603e5
commit 77b230dc5f
36 changed files with 66 additions and 72 deletions
@@ -3,7 +3,7 @@ import renderer from 'react-test-renderer';
// Components
import Select from '.';
describe('Select testing snapshot', () => {
describe('Select', () => {
const options = [
{
label: 'Option 1',
@@ -15,9 +15,7 @@ describe('Select testing snapshot', () => {
}
];
const value = 'Temp value';
const handleOnChange = () => {
console.log('On change');
}
const handleOnChange = jest.fn();
const wrapper = renderer.create(
<Select
@@ -28,7 +26,7 @@ describe('Select testing snapshot', () => {
/>
);
test('render', () => {
test('Should render correctly', () => {
expect(wrapper).toMatchSnapshot();
});
});
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Select testing snapshot render 1`] = `
exports[`Select Should render correctly 1`] = `
<select
aria-label="Sort"
className="sc-bdnyFh dqXTRP"
onChange={[Function]}
onChange={[MockFunction]}
value="Temp value"
>
<option