mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-23 04:19:48 +00:00
Update code and message test case
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user