refactor to simplify tests

This commit is contained in:
Ryan Di 2024-10-09 13:28:17 +08:00
parent 940099f85d
commit b0375fe5db
6 changed files with 349 additions and 53 deletions

View file

@ -104,7 +104,7 @@ console.error = (...args) => {
// the react's act() warning usually doesn't contain any useful stack trace
// so we're catching the log and re-logging the message with the test name,
// also stripping the actual component stack trace as it's not useful
if (args[0]?.includes("act(")) {
if (args[0]?.includes?.("act(")) {
_consoleError(
yellow(
`<<< WARNING: test "${