-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CurrentEuiBreakpoint testenv mocks #6117
Fix CurrentEuiBreakpoint testenv mocks #6117
Conversation
Good idea
We can always backport this if we find problems in Kibana |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6117/ |
- stopped being an issue after the circular dependency was resolved
Preview documentation changes for this PR: https://eui.elastic.co/pr_6117/ |
* [Misc] Rename current breakpoint files to use snake_casing to match rest of repo * Move out useCurrentEuiBreakpoint hook to separate file to fix testenv behavior * Update changed EuiPageTemplate snapshots as a result of this fix * Fix circular dependency * Fix SSR/typeof undefined issue 🤦 * Revert snapshots - stopped being an issue after the circular dependency was resolved * Changelog
Summary
@thompsongl your comments in the previous breakpoint PR made me realize I'd also done the
.testenv
mock foruseCurrentEuiBreakpoint
incorrectly. I only mocked the hook itself, but the file also had an exported context and provider component that was missing in our compiledtest-env
directory.To solve the issue I decided to split the hook out into its own file and only mock that instead of attempting to mock provider logic (as I think that makes sense to leave as-is).
I don't think this affects Kibana since it's unlikely that there's any Kibana usages yet, but let me know if not.
Checklist
yarn build-pack
and inspect test-env dir- [ ] A changelog entry exists and is marked appropriatelyNot sure if this is needed - thoughts?