-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(nuxt): Use sentry.server.config.ts
in E2E tests
#13999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
❌ 5 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great findings, glad it works now.
/* This script copies the `import-in-the-middle` content of the E2E test project root `node_modules` to the build output `node_modules` | ||
For some reason, some files are missing in the output (like `hook.mjs`) and this is not reproducible in external, standalone projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m: Could we not just use cp
inside the build script in package.json instead of writing code to copy this over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it, so much cleaner ✨
Thanks for the input!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
The E2E tests still used an `instrument` file in the `public` folder (which is not the way to setup the SDK anymore) because `import-in-the-middle/hook.mjs` was not available and threw an error. To be able to properly test the setup with `sentry.server.config.ts`, a function was added that copies the `import-in-the-middle` folder to the build output to include all files.
The E2E tests still used an `instrument` file in the `public` folder (which is not the way to setup the SDK anymore) because `import-in-the-middle/hook.mjs` was not available and threw an error. To be able to properly test the setup with `sentry.server.config.ts`, a function was added that copies the `import-in-the-middle` folder to the build output to include all files.
The E2E tests still used an
instrument
file in thepublic
folder (which is not the way to setup the SDK anymore) becauseimport-in-the-middle/hook.mjs
was not available and threw an error. To be able to properly test the setup withsentry.server.config.ts
, a function was added that copies theimport-in-the-middle
folder to the build output to include all files.