-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Consolidates Jest configuration files and scripts #82671
Conversation
7d060b4
to
b11528d
Compare
b11528d
to
57db0b9
Compare
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project. OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest` Blocker to elastic#72569 Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
57db0b9
to
cee11cc
Compare
Pinging @elastic/kibana-operations (Team:Operations) |
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.
Alerting code changes LGTM
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.
ML edits LGTM
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.
LGTM
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.
Maps changes LGTM
code review
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.
app arch changes LGTM
"@kbn/utils": "link:../kbn-utils" | ||
} | ||
} |
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.
Please install the editorconfig plugin in your editor so that this doesn't keep getting flipped back in forth in every PR
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.
I don't believe we have come to a consensus on if we should have newlines or not?
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.
I swapped it because the few I checked had trailing newlines, and I hate seeing the red notice in the Github UI. However, looks like we mostly don't use newlines so I will revert this one.
find packages -name "package.json" | xargs tail -n 1
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.
Yeah, it's not exactly enforced but the contributing guides says to install the editorconfig plugin and that config has a rule for package.json specifically (also npm/yarn don't add the extra newline IIRC) https://github.com/elastic/kibana/blob/master/.editorconfig#L11-L14
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.
Apparently there is an editorconfig plugin for eslint, so if we wanted to pass those files through eslint too we could, but that's a separate issue.
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.
Security LGTM
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Have received quite a few reviews, but still, some remain. Per the description, I am going to move forward with merging due to the nature of the changes. If any issues are raised, I am happy to address them in a follow-up. |
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project. OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest` Blocker to elastic#72569 Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project. OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest` Blocker to #72569 Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* master: [Security Solution][Detections] Adds framework for replacing API schemas (elastic#82462) [Enterprise Search] Share Loading component (elastic#83246) Consolidates Jest configuration files and scripts (elastic#82671) APM header changes (elastic#82870) [Security Solutions] Adds a default for indicator match custom query of *:* (elastic#81727) [Security Solution] Note 10k object paging limit on Endpoint list (elastic#82889) [packerCache] fix gulp usage, don't archive node_modules (elastic#83327) Upgrade Node.js to version 12 (elastic#61587) [Actions] Removing placeholders and updating validation messages on connector forms (elastic#82734) [Fleet] Rename ingest_manager_api_integration tests fleet_api_integration (elastic#83011) [DOCS] Updates Discover docs (elastic#82773) [ML] Data frame analytics: Adds map view (elastic#81666) enables actions scoped within the stack to register at Basic license (elastic#82931)
Jest tests are currently organized into two main configuration files (
src/dev/jest/config.js
andx-pack/dev-tools/jest/create_jest_config.js
). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs, moving them to the@kbn/test
project.Blocker to #72569
Reviews: This change will trigger a review from almost all teams, however considering the nature of these changes I don't believe that is necessary. These changes are only in tests, and mostly moving files around.
Overview:
src/dev/jest
,src/test_utils
, andx-pack/test-utils
intopackages/kbn-test/src/jest
src/dev/jest/config.js
andx-pack/dev-tools/jest
moved topackages/kbn-test/jest-preset.json
.test_utils
. Those aliases have been removed in favor of importing these utilities from@kbn/test/jest