React Unit Testing using @testing-library/react
Example component code:
import {useState} from 'react';
const Text = ({text}) => {
const [state, setState]= useState(0);
const add = () => {
setState(state+1)
};
return (
<div>
<h1>Hello World</h1>
...
erba-blognote.com1 min read