next.js
8f014aff - Consolidate dynamic IO errors test suites into a single fixture (#81451)

Commit
173 days ago
Consolidate dynamic IO errors test suites into a single fixture (#81451) Previously, we had separate fixtures for each test case because it's complicated to assert on build errors when multiple pages have errors. This meant that running those tests, and especially updating their snapshots, took forever because each test case needed to be installed and built separately. We can consolidate the cases into a single fixture (and test suite) by leveraging the internal `NEXT_PRIVATE_APP_PATHS` environment variable to prerender individual pages, along with `--experimental-build-mode generate`. The compilation is done upfront for all tests using `--experimental-build-mode compile`. Dev mode also profits, by sharing a single dev server instance across all tests. For convenient updating of the snapshots for all modes and bundlers, we're also adding a small script at `test/e2e/app-dir/dynamic-io-errors/update-snapshots.sh`. closes NAR-183
Author
Parents
Loading