-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test: Improve node integration test running #10673
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
@@ -10,7 +10,6 @@ setTimeout(() => { | |||
Sentry.init({ | |||
dsn: 'https://[email protected]/1337', | |||
release: '1.0', | |||
debug: true, |
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.
I also removed a bunch of debug: true
leftovers in the tests, to clean up the output.
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.
Much better - thanks a lot for tackling this!
One Q: Did anything change in regards to filtering to run a specific test (or subset of tests)? I guess the skipped tests will only be shown in the summary at the end?
const nonSkippedCount = totalCount - skipCount; | ||
|
||
if (skips.length) { | ||
console.log('\x1b[2m%s\x1b[0m', '\nSkipped tests:'); |
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.
theoretically, we could use chalk
or similar libraries for the color bytes but I think this is also fine
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.
yeah, I thought about this as well - I think it is OK for now, if we want to do more with that we can always switch over to chalk!
So if a single test in a suite is skipped, it will be shown normally by jest. Only if all tests in a file are skipped will we show it at the end of the tests in the summary! |
For reference, here you can see how it looks (with all successful tests): https://github.com/getsentry/sentry-javascript/actions/runs/7915325070/job/21606990771?pr=10673 |
This improves the output and formatting of the node integration tests, making it a bit easier to work with them:
Skipped tests:

Failed test:

Successful test:
Failed test summary:

Successful test summary:
