Repository navigation
chore(utilities): migrate tests to use @testing-library/react - #35302
Merged
Martin Hochel (Hotell) merged 6 commits intoOct 10, 2025
Conversation
Dmytro Kirpa (dmytrokirpa)
force-pushed
the
refactor/migrate-v8-utilities-from-test-renderer-to-rtl
branch
from
October 8, 2025 13:52
0d65bbe to
cc52eb0
Compare
Dmytro Kirpa (dmytrokirpa)
marked this pull request as ready for review
October 8, 2025 13:54
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
Contributor
|
to get proper R19/R17 validation we need to enable RIT as well:
"packages/react/**",
"packages/react-hooks/**",
"packages/react-examples/**",
"packages/react-experiments/**",
"packages/charts/react-charting/**",
+ "packages/utilities/**"
"scripts": {
"build": "just-scripts build",
- "clean": "just-scripts clean",
- "code-style": "just-scripts code-style",
- "just": "just-scripts",
- "lint": "just-scripts lint",
- "start-test": "just-scripts jest-watch",
- "test": "just-scripts test",
- "update-snapshots": "just-scripts jest -u",
"verify-packaging": "just-scripts verify-packaging"
}
|
Martin Hochel (Hotell)
left a comment
Contributor
There was a problem hiding this comment.
lets unify the setup and RIT addition to have solid pattern for automation.
otherwise LGTM
| import * as React from 'react'; | ||
| import * as renderer from 'react-test-renderer'; | ||
| import { act, render } from '@testing-library/react'; | ||
| import '@testing-library/jest-dom'; |
Contributor
There was a problem hiding this comment.
lets follow our common setup and put this to packages/utilities/config/tests.js
Contributor
Author
There was a problem hiding this comment.
done
| import { Stylesheet, InjectionMode, mergeStyles } from '@fluentui/merge-styles'; | ||
| import { classNamesFunction } from './classNamesFunction'; | ||
| import { Customizations } from './customizations/Customizations'; | ||
| import { safeCreate } from '@fluentui/test-utilities'; |
Contributor
Contributor
Author
There was a problem hiding this comment.
done
1 task done
Martin Hochel (Hotell)
approved these changes
Oct 10, 2025
Tudor Popa (tudorpopams)
pushed a commit
to tudorpopams/fluentui
that referenced
this pull request
Apr 14, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Previous Behavior
V8
utilitiespackage usesreact-testing-libraryfor tests which isn't supported by React 19New Behavior
Updated tests to replace
react-test-rendererwith@testing-library/reactfor rendering componentsRelated Issue(s)