após construir o arquivo de teste para o componente transação (test com snapshot), recebi um novo tipo de mensagem no terminal que ainda não consegui entender com as pesquisas na internet. Ps: os test continuam dando ok, não afetou a execução
PASS src/transacoes/Transacao.test.js
● Cannot log after tests are done. Did you forget to wait for something async in your test?
Attempted to log "Warning: An update to App inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
in App (at App.test.js:9)".
42 | carregarTransacoes();
43 | }, [saldo])
> 44 |
| ^
45 | return (
46 | <div className="App">
47 | <header className="App-header">
at console.error (node_modules/@jest/console/build/BufferedConsole.js:163:10)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:88:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:60:5)
at warnIfNotCurrentlyActingUpdatesInDEV (node_modules/react-dom/cjs/react-dom.development.js:23284:7)
at dispatchAction (node_modules/react-dom/cjs/react-dom.development.js:15656:9)
at obterSaldo (src/App.js:44:5)