Skip to content
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

Workaround for Jest duplicate manual mock warnings #78721

Closed
wants to merge 1 commit into from

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Sep 29, 2020

Removes Jest duplicate manual mock warnings when running X-Pack unit tests.

Closes #75135

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/enterprise_search/server/__mocks__/index.ts
    * <rootDir>/plugins/enterprise_search/common/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/enterprise_search/common/__mocks__/index.ts
    * <rootDir>/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/index.ts
    * <rootDir>/plugins/enterprise_search/public/applications/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/enterprise_search/public/applications/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: request_responses
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/lib/timeline/routes/__mocks__/request_responses.ts
    * <rootDir>/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts

jest-haste-map: duplicate manual mock found: api
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/cases/containers/__mocks__/api.ts
    * <rootDir>/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts

jest-haste-map: duplicate manual mock found: api
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts
    * <rootDir>/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts

jest-haste-map: duplicate manual mock found: api
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts
    * <rootDir>/plugins/security_solution/public/detections/containers/detection_engine/rules/__mocks__/api.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts
    * <rootDir>/plugins/security_solution/public/overview/components/events_by_dataset/__mocks__/index.tsx

jest-haste-map: duplicate manual mock found: mock
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/detections/pages/detection_engine/rules/all/__mocks__/mock.ts
    * <rootDir>/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/public/overview/components/events_by_dataset/__mocks__/index.tsx
    * <rootDir>/plugins/lens/public/indexpattern_datasource/operations/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: index
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/lens/public/indexpattern_datasource/operations/__mocks__/index.ts
    * <rootDir>/plugins/spaces/server/lib/utils/__mocks__/index.ts

jest-haste-map: duplicate manual mock found: shared_imports
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/transform/public/__mocks__/shared_imports.ts
    * <rootDir>/plugins/ml/__mocks__/shared_imports.ts

jest-haste-map: duplicate manual mock found: request_responses
  The following files share their name; please delete one of them:
    * <rootDir>/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts
    * <rootDir>/plugins/case/server/routes/api/__mocks__/request_responses.ts

@tylersmalley tylersmalley force-pushed the duplicate-mock branch 2 times, most recently from 07e3259 to ad1349c Compare September 29, 2020 22:53
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

  • 💔 Build #78130 failed ad1349c71c56ff80a15c209b2569ca8375fa8f8a
  • 💔 Build #77735 failed 84faf688bcadaf273e714a17cfe91b90db8b6879

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tylersmalley tylersmalley marked this pull request as ready for review September 30, 2020 01:39
@tylersmalley tylersmalley requested a review from a team September 30, 2020 01:39
@tylersmalley tylersmalley requested a review from a team as a code owner September 30, 2020 01:39
@tylersmalley tylersmalley added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v8.0.0 labels Sep 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/decorators/area_decorator.js <AreaSeriesDecorator /> should render and match a snapshot 1`] = `
<AreaSeries
<Connect(SpecInstance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear what caused this?

@tylersmalley tylersmalley marked this pull request as draft September 30, 2020 05:29
@tylersmalley
Copy link
Contributor Author

Going back to draft on this - I need to dig more into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jest duplicate mocks names warning
4 participants