propTypes works in the main JS file where I define the component. It"s what I"m looking forward to. But doing check in the describe module in my test.js interfered with my test. I didn"t introduce prop-type in test.js. How can I cancel check in test.js
test.js
describe ("Search", () = > {
it (" renders without crashing", () = > {
const div = document.createElement("div");
ReactDOM.render(<Search>Search</Search>, div);
});
test ("has a valid snapshot", () = > {
const component = renderer.create(
<Search>Search</Search>
);
let tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});
these blocks are just for basic validation. No parameters were passed in. The field that causes the console to keep prompting required is undefined