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

Jest multi-project configuration #77894

Merged
merged 8 commits into from
Dec 2, 2020
Merged

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Sep 18, 2020

Closes #72569
Closes #75202
Closes #41129

Blocked on:

Overrides for tests which are incompatible with jest-circus added in 72d7e42. A PR is currently open (#82280) to resolve these incompatabilities but should not block this PR.

A CI check has been added to ensure that no new tests are added that are not covered by the main config.

Reviewing:

The commits have been split out to isolate the changes consisting of the auto-generated jest.config.js files in 7518751fffb0ad73c9649ffe42ef81824f875086.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

KibanaApp changes LGTM, code review

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

infra plugin unit tests run individually and as part of the overall config.

But where do they show up in the CI test results? Is it intentional that they are not picked up by the test reporter anymore?

image

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

I'm so excited for this - we can hopefully finally bake in coverage reporting (and exceptions) into a shorter yarn jest command. Huge thanks from the Enterprise Search team!

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Ingest Manager/Fleet change LGTM

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

ES UI plugins LGTM.

Signed-off-by: Tyler Smalley <[email protected]>
scripts/jest.js Outdated Show resolved Hide resolved
scripts/jest_integration.js Outdated Show resolved Hide resolved
@tylersmalley tylersmalley requested a review from a team as a code owner December 1, 2020 19:46
Signed-off-by: Tyler Smalley <[email protected]>
@tylersmalley
Copy link
Contributor Author

@weltenwort, good catch - I have resolved the issue of the test reporter.

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

infra plugin changes LGTM

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

apm changes lgtm

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

exports[`Service Maps with a trial license /api/apm/service-map when there is data returns service map elements filtering by environment not defined 1`] = `
Copy link
Member

Choose a reason for hiding this comment

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

@dgieselaar Does this look okay to you? (removing all the snapshots)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Jest integration tests donot currently run for X-Pack - I have a draft PR up showing that removing these does not effect the current CI jobs. #84783

Copy link
Member

@pzl pzl left a comment

Choose a reason for hiding this comment

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

Security / Endpoint LGTM

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@tylersmalley
Copy link
Contributor Author

tylersmalley commented Dec 2, 2020

@elasticmachine merge upstream

All teams affected by more than just adding a jest.config.js file to their plugin have approved this PR. Unless there are any objections, I will be merging this after the next successful CI run. Thanks all. There will be more follow-ups to come to improve Jest further now that we have per-project configurations.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Distributable file count

id before after diff
default 43196 43325 +129
oss 22576 22644 +68

History

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

@tylersmalley tylersmalley merged commit b593781 into elastic:master Dec 2, 2020
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Dec 2, 2020
Signed-off-by: Tyler Smalley <[email protected]>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/integration_tests/team_assignment.test.js
#	src/plugins/console/jest.config.js
#	x-pack/plugins/canvas/scripts/jest.js
tylersmalley pushed a commit that referenced this pull request Dec 2, 2020
Signed-off-by: Tyler Smalley <[email protected]>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/integration_tests/team_assignment.test.js
#	src/plugins/console/jest.config.js
#	x-pack/plugins/canvas/scripts/jest.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Drilldowns Embeddable panel Drilldowns Feature:Embedding Embedding content via iFrame Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team Team:Operations Team label for Operations Team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.11.0 v8.0.0
Projects
None yet