npm / @emotion/jest
@emotion/jest
What changed in @emotion/jest 10 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
6 breaking2 new APIs and options3 tooling
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@emotion/jest 111 changes
Tooling 1
@types/jest@30.x is now allowed as an optional peer dependency.
@emotion/jest 1010 changes
Breaking changes 6
Emotion 10 makes underlying class names harder to access; using class names directly does not provide features like zero-config server rendering.
Emotion 10 shifts style composition from combining generated class names with
cxto composing styles in thecssprop.Migrate
styledimports fromreact-emotionto@emotion/styled, with Emotion exports in a separate import.Replace
injectGlobalusage withGlobalstyles.Using the
cssprop requires importingjsxand setting the JSX pragma at the top of the source file.Emotion 10 requires React 16.3 or greater.
New APIs and options 2
Add a compat cache provider while the app still uses
css,keyframesorinjectGlobalfromemotion; remove it after those usages are gone.Use
ClassNamesto generate styles for components that accept props such aswrapperClassName.
Tooling 2
Migrate
cssusage that generates a class name to thecssprop.The plugin can automate the first part of the incremental migration to Emotion 10.