next.js
a52ebf40 - Add tests for Suspensey CSS (#47708)

Commit
2 years ago
Add tests for Suspensey CSS (#47708) This PR adds a test to confirm that the component will be committed after the stylesheet is loaded, by delaying the CSS request in middleware and then check the active style in `useEffect` (technically it should be `useLayoutEffect`). Since our current timeout for that is set to 500ms, I also added a test with 1000ms delay to rule out false negative cases.
Author
Parents
Loading