Is there a way to import a function from a react component into a test file?
for example:
component:
const funcToExport = () => {
let a = 1;
let b = 2;
let value = a + b;
return value
}
test file:
import funcToExport from './component';
can this be done, so you can use the function in the test file?