Merged
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
# Conflicts: # package.json # pnpm-lock.yaml
scttcper
commented
Jun 17, 2025
Comment on lines
-47
to
-51
| it('renders user messages differently', () => { | ||
| renderComponent(); | ||
| const userMessage = screen.getByText('User message'); | ||
| expect(userMessage.closest('div')).toHaveStyle('color: inherit'); | ||
| }); |
Member
Author
There was a problem hiding this comment.
this test doesn't seem to work anymore in latest jsdom. I think it was attempting to read from emotion's styles on a nearby div.
scttcper
commented
Jun 17, 2025
# Conflicts: # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
scttcper
added a commit
that referenced
this pull request
Jul 1, 2025
fixes an issue with the next version of jsdom where the dropdown doesn't close when clicking outside. As far as i can tell the behavior is the same with or without these options. unblocks #93303
# Conflicts: # package.json # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
scttcper
commented
Jul 10, 2025
| // To disable the sentry jest integration, set this to 'jsdom' | ||
| testEnvironment: '@sentry/jest-environment/jsdom', | ||
| testEnvironmentOptions: { | ||
| globalsCleanup: 'on', |
Member
Author
There was a problem hiding this comment.
this is a new feature in jest 30 https://jestjs.io/blog/2025/06/04/jest-30#globals-cleanup-between-test-files
ryan953
reviewed
Jul 10, 2025
| "@types/history": "^3.2.5", | ||
| "@types/invariant": "^2.2.35", | ||
| "@types/jest": "29.5.14", | ||
| "@types/jest": "30.0.0", |
ryan953
approved these changes
Jul 10, 2025
andrewshie-sentry
pushed a commit
that referenced
this pull request
Jul 14, 2025
Pulls just the testable window location changes out for Jest 30 #93303 window.location in the next version of jsdom is not configurable and cannot be changed via assignment. By using testableWindowLocation we can mock the entire module and do whatever we want instead of trying to overwrite the jsdom globals
andrewshie-sentry
pushed a commit
that referenced
this pull request
Jul 14, 2025
[jest 30 changelog](https://jestjs.io/blog/2025/06/04/jest-30) the biggest change being the newer version of JSDOM which breaks a few things for us. Two major issues around window.location: > Can no longer assign mocks directly to the location object (location.assign(), location.replace()) now error when used. **solution:** test helper like `testableWindowLocation.assign()` that we mock out in tests > Can no longer directly set the url in tests `window.location.search = '?something=true'` **solution** make jsdom available as a global and use `jsdom.reconfigure({url: something})` which lets you set the url. getsentry/jest-sentry-environment#26
ryan953
added a commit
that referenced
this pull request
Jul 28, 2025
This `require()` call wasn't working since we added `--experimental-transform-types` in #93303 We can see our balancer_strategy logging stopped logging `by_path` as often, instead showing 'other': <img width="530" height="196" alt="SCR-20250726-mgai" src="https://github.com/user-attachments/assets/b449b7a7-f750-47c1-9b4c-1e602fe55fbd" /> And this impacted at test worker runtimes too: <img width="531" height="203" alt="SCR-20250726-mfyl" src="https://github.com/user-attachments/assets/98e4b294-1b16-4b3e-b487-c443132e7d3e" /> Without the balancer stats js tests got more than a minute slower, because the shards are unbalanced and slowest one is taking longer now. What we learned though is that the jest-balance.json sharing is pretty good and keeps all the shards at about the same runtime! I made a new dashboard to see all the CI worker runtimes for frontend.yaml: https://sentry.sentry.io/dashboard/141271/?project=5899451&statsPeriod=30d. The critical path is usually jest, but eslint is taking almost the same amount of time too running in parallel. If we speedup jest then we'll save wall-time in CI. There's also a dashboard to see the slowest test suites and test cases. It's got the balancer_strategy chart added too: https://sentry.sentry.io/dashboard/141273/?project=4857230&statsPeriod=30d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jest 30 changelog the biggest change being the newer version of JSDOM which breaks a few things for us.
Two major issues around window.location:
solution: test helper like
testableWindowLocation.assign()that we mock out in testssolution make jsdom available as a global and use
jsdom.reconfigure({url: something})which lets you set the url. getsentry/jest-sentry-environment#26