Open eatyourgreens opened 1 month ago
Trying to replicate this by running yarn test
isolated to StandardLayout. Has this warning been resolved by recent changes to the workflow assignment feature?
It's still showing up in the project app tests, but I don't know how to isolate it.
https://github.com/zooniverse/front-end-monorepo/actions/runs/12019334877/job/33505680307#step:9:676 (around about line 669 in the logs.)
Weird. It looks like the warning is generated by ClassifyPageContainer, and even specifies the test is wrapped by enzyme, which is true of ClassifyPageContainer.spec.js, but isolating those tests and running yarn test:ci
does not replicate the warning locally.
Package
app-project
Describe the bug
Spotted while running the tests for the project app. There's a
useState
hook that appears to run conditionally.To Reproduce
Run the tests for the project app and check the output for
StandardLayout
. The tests break the rules of hooks, but still pass, so it's easy to miss this error. I only noticed it because it generated a large block of red text in the terminal, and I happened to be watching when the tests ran.Expected behavior
React hooks have to run in the same order during every render of a component. Breaking the rules of hooks should probably fail the CI tests.