Repository navigation
Conversation
Jest could not run in packages/react: there was no test script, the only test imported a removed RCComponent export, the Babel config emitted ESM, and @testing-library/react 12 does not support React 19. - add a test script and upgrade to Jest 29, Testing Library 16 and jest-axe - add jest config and setup (jsdom, axe matcher, stubs for swiper, react-syntax-highlighter ESM and MessageChannel) - emit CommonJS from Babel only when NODE_ENV=test - replace the stale index test with an export smoke test - add axe baseline tests for TypingUsers Refs RocketChat#1219 Signed-off-by: Akay-74 <Akay-74@users.noreply.github.com>
Runs yarn workspace @embeddedchat/react test before the build so the Jest and jest-axe tests run on every PR. Signed-off-by: Akay-74 <Akay-74@users.noreply.github.com>
Akay-74
marked this pull request as ready for review
October 10, 2026 11:56
This branch has not been deployed
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.
Restore Jest and add jest-axe baseline
Acceptance Criteria fulfillment
packages/react(yarn test)jest-axeadded andtoHaveNoViolationsregisteredTypingUsers(idle and active states)build-and-lint.yml)Refs #1219
What was broken
Jest couldn't run in
packages/react: notestscript,src/index.test.jsimported a removedRCComponentexport, the Babel config emitted ESM, and@testing-library/react12 doesn't support React 19.Changes
testscript; Jest 29, jsdom, Testing Library 16, jest-axejest.config.js/jest.setup.js: jsdom env, axe matcher, stubs forswiper,react-syntax-highlighterESM andMessageChannel(Node's real one keeps Jest open)NODE_ENV=test, so the production build is unchangedTypingUsers.a11y.test.jsyarn.lockgrows by about 1,300 lines from the Jest upgrade.Video/Screenshots
N/A, test tooling only.
PR Test Details
cd packages/react && yarn testgives 2 suites, 3 tests passing in about 2s. I also checked that axe fails on an unlabeled<button>, so a green run is meaningful.