Skip to content

Jest multi-project configuration#77894

Merged
tylersmalley merged 8 commits intoelastic:masterfrom
tylersmalley:jest-multi
Dec 2, 2020
Merged

Jest multi-project configuration#77894
tylersmalley merged 8 commits intoelastic:masterfrom
tylersmalley:jest-multi

Conversation

@tylersmalley
Copy link
Copy Markdown
Member

@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
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

ML and Transforms plugin changes LGTM

Copy link
Copy Markdown
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Alerting related changes LGTM

Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

maps changes LGTM
code review

Copy link
Copy Markdown
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
Copy Markdown
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

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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
Copy Markdown
Member 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
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Member 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
Copy Markdown
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

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 - DEPRECATED Use Team:obs-ux-infra_services. Team:Fleet Team label for Observability Data Collection Fleet team Team:Operations Kibana-Operations Team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test/dev] support a common jest entry Use Jest muti-project runner instead of a global config [test] run x-pack jest tests from root