next.js
c1c3675f - refactor tests for readability (#51051)

Commit
2 years ago
refactor tests for readability (#51051) You'll probably want to disable whitespace in the diff ## Description This allows for better editor support by using `describe` or functions called `describe` with the same syntax instead of custom names. Changes: - `nextTestSetup` can be used instead of `createNextDescribe` keeping the same behaviour but being called inside a `describe` "block" (not applied everywhere) - `getSnapshotTestDescribe` replaced with a custom `describe.each` - `sandbox` helper function for `acceptance`/`acceptance-app` merged into a single shared one - `outdent` to remove the indent from inline files in tests which helps with consistent snapshots
Parents
Loading