You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref(nextjs): Small changes to nextjs integration test runner (#3819)
This makes a number of small tweaks to the integration test runner in `@sentry/nextjs`, mostly changes I made to help myself as I was trying to debug failing tests in another PR, either because they made the debugging itself easier or because they sped up the overall running of the test suite (in most cases by doing things only once instead of multiple times where possible).
Included changes:
- Add a default version of `nextjs` to the integration test project’s dependencies. This makes it possible to call `yarn` (and `yarn build`) out of the context of the test runner script (specifically, when using a debugger).
- Add a VSCode debug profile for nextjs integration tests.
- Speed up initial setup by only having `yarn` install packages once per version of `next` (instead of once to install all non-`nextjs` packages, and again when adding the specific version of `next`).
- Back up `next.config.js` outside of the loops, so we’re guaranteed to restore from the original.
- As part of cleanup, nuke all of `node_modules` rather than just removing `nextjs` (we’re going to delete `node_modules` before the next run anyway, and this way `yarn` doesn’t go through yet another install process on its way out the door).
- Also as part of cleanup, remove all files added to the yarn cache as a result of this test run, in order to prevent the cache from growing arbitrarily large.
- Only run check on node version once, since it’s the same across all loops.
- Label each event/transaction/session displayed (when using `--debug` on server tests) with the name of the test it's from.
- Remove test for tracing 404s, since it the underlying code doesn’t actually work on its own (this is okay; we don’t capture 404s in any other framework).
- Make some formatting changes (as insisted upon by the auto-formatter).
- Add some comments and clean up logging a little bit.
0 commit comments