-
Notifications
You must be signed in to change notification settings - Fork 844
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
Custom Jest matchers causing issues with Jest upgrade #2671
Comments
Indeed. Ideally, EUI should not be shipping any test-related code (except for helper utilities which don't exist yet). This includes the .test. files themselves, and their current inclusion in the I'll address this tomorrow (Monday), but likely won't be able to get that change into Kibana until later in the week as we've got one EUI upgrade already pending elastic/kibana#52688 |
It's possible that a simple config change will fix this, but I'd be kind of surprised. I think it would be much simpler to remove these as extensions of Jest's expect object and instead have helper functions that test if something is an |
@spalger looks like a config change does solve the immediate issue - #2673 We use dts-generator (with some post-processing) to generate our typescript definitions file. That package scans the filesystem for typescript files from which it extracts the types. This included data_grid.test.tsx which provides the jest namespace, conflicting in Kibana. |
Thanks @chandlerprall! |
We're unable to upgrade jest because the custom jest matcher types in EUI are conflicting with the version of Jest we're trying to install. I don't think there's a good reason for these extensions personally, and would prefer if they could just be implemented as helper functions so that the types could be removed. Thoughts?
Kibana Jest upgrade: elastic/kibana#53079
Error from https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/15622/execution/node/128/log/
Problematic module:
The text was updated successfully, but these errors were encountered: