-
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
Remove src/test/*
from type definitions file
#3715
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3715/ |
|
Yep, this is a better approach. Tested in Kibana without altering |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3715/ |
The generated files don't look correct, all of the
|
Good catch. Updated to include full module names. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3715/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! Ran build locally, confirmed enzyme
and the test utilities are no longer mentioned in eui.d.ts and are now present in es/index.d.ts and lib/index.d.ts
jenkins test this "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3715/ |
Summary
Closes #3709 by removing
src/test/*
files fromeui.d.ts
. Additionally generates newlib/test/index.d.ts
andes/test/index.d.ts
files specifically for consumers who usetest
directory utilities.As
src/test
is not formally part of EUI's API,test
imports occur fromlib
ores
and are@ts-ignore
ed. This PR is an enhancement for those imports, as types will automatically be picked up when importing from@elastic/eui/[lib, es]/test
.Removing
src/test
fromeui.d.ts
allows for@types/enzyme
to be moved back to devDep status. Use oflib/test
ores/test
assumes your project maintains its own@types/enzyme
dependencyChecklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Added or updated jest tests- [ ] Checked for accessibility including keyboard-only and screenreader modes