Skip to content

fix: remove stale @emotion/react mock from webapp unit tests#88

Merged
avasconcelos114 merged 1 commit into
mattermost-community:masterfrom
roberson-io:fix/webapp-unit-tests
Jul 16, 2026
Merged

fix: remove stale @emotion/react mock from webapp unit tests#88
avasconcelos114 merged 1 commit into
mattermost-community:masterfrom
roberson-io:fix/webapp-unit-tests

Conversation

@roberson-io

Copy link
Copy Markdown
Contributor

Duplicates #87 so a reviewer with merge permission can land the fix ahead of the next release.

Summary

After #84 (which added webapp/src/index.test.js) and #86 (which removed @emotion/babel-preset-css-prop and the unused @emotion/react dep) both merged, npm test on master fails: the new test file jest.mocks @emotion/react, which no longer exists in the dependency graph. Both PRs' CI passed individually — the incompatibility only surfaced once both were on master.

Fix: drop the now-unnecessary jest.mock('@emotion/react', ...) block from webapp/src/index.test.js. Nothing in the code under test imports @emotion/react, so no replacement mock is needed.

Test plan

  • npm test in webapp/ — all 3 suites / 10 tests pass locally
  • CI (webapp lint + test + build) passes on this PR

Duplicates PR mattermost-community#87 so a
maintainer with review permission can approve/merge it before the
next release.
@avasconcelos114
avasconcelos114 merged commit 91ddef2 into mattermost-community:master Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants