I'm new at testing components and I'm facing a issue: I have a component that receives a number as props, and then format it:
const format = (number) => (number/ 100).toLocaleString("pt-BR", { style: "currency", currency: "BRL" });
<StatNumber>{format(number)}</StatNumber>
How I'm supposed to test it? I can't get by getByText("") because I don't have the formated number yet, should I create a funcion in my tests that do it?
But react-testing-library does not test logic, right? What if later I change the way I format it?