fix(test): Upgrade framer motion, Disable animations in tests#112270
Merged
fix(test): Upgrade framer motion, Disable animations in tests#112270
Conversation
Skip all framer-motion animations in tests via `MotionGlobalConfig.skipAnimations = true` so components render immediately without waiting for animation frames or transitions. Also bumps framer-motion from 12.23.12 to 12.38.0. Drawer test benchmarks (before → after): - globalDrawer/index.spec.tsx: 4.76s → 1.15s (~4x faster) - 5 other drawer test suites: 8.57s → 3.24s (~2.6x faster) Ref: #112196
evanpurkhiser
approved these changes
Apr 6, 2026
Member
|
@scttcper Does this mean we could get rid of the testableTransition? I would like to get to a state where everyone uses |
Member
was just putting together a codemod for this |
Member
I think we can do that now with a global reduce motion config also? |
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
Skip all framer-motion animations in tests via `MotionGlobalConfig.skipAnimations = true` [docs](motiondivision/motion@3dffb40) so components render immediately without waiting for animation frames or transitions. Also bumps framer-motion from 12.23.12 to 12.38.0. ## Drawer test benchmarks (before → after) | Test suite | Before | After | Speedup | |---|---|---|---| | `globalDrawer/index.spec.tsx` | 3.01s | 1.20s | 2.5x | | `eventFeatureFlagSection.spec.tsx` | 2.66s | 2.30s | 1.2x | | `breadcrumbsDataSection.spec.tsx` | 1.95s | 1.58s | 1.2x | This also benefits every other test that renders framer-motion components (modals, tooltips, any `AnimatePresence` usage).
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.
Skip all framer-motion animations in tests via
MotionGlobalConfig.skipAnimations = truedocs so components render immediately without waiting for animation frames or transitions.Also bumps framer-motion from 12.23.12 to 12.38.0.
Drawer test benchmarks (before → after)
globalDrawer/index.spec.tsxeventFeatureFlagSection.spec.tsxbreadcrumbsDataSection.spec.tsxThis also benefits every other test that renders framer-motion components (modals, tooltips, any
AnimatePresenceusage).Inspired by: #112196