Skip to content

[ML] Converts utils Mocha tests to Jest - #63132

Merged
peteharverson merged 4 commits into
elastic:masterfrom
peteharverson:ml-mocha-to-jest-tests
Apr 14, 2020
Merged

peteharverson merged 4 commits into
elastic:masterfrom
peteharverson:ml-mocha-to-jest-tests

Conversation

@peteharverson

@peteharverson peteharverson commented Apr 9, 2020 •

Copy link
Copy Markdown
Contributor

Summary

Converts legacy Mocha tests to Jest for some ML utility files:

  • ml/common/util/anomaly_utils.ts (also converted to TS)
  • ml/public/application/components/rule_editor/utils.js
  • ml/public/application/util/calc_auto_interval.js
  • ml/public/application/util/chart_utils.js
  • ml/public/application/util/string_utils.js (deleted guessTimeFormat function which is no longer used)

Part of #62006

Checklist

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson peteharverson added review v7.8.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Apr 9, 2020
@peteharverson peteharverson mentioned this pull request Apr 9, 2020
19 tasks done
@peteharverson peteharverson self-assigned this Apr 14, 2020

@darnautov darnautov left a comment

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.

LGTM

Comment thread x-pack/plugins/ml/public/application/util/chart_utils.test.js Outdated
@peteharverson

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

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

@alvarezmelissa87 alvarezmelissa87 left a comment

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.

LGTM ⚡

@peteharverson
peteharverson merged commit 3e26654 into elastic:master Apr 14, 2020
@peteharverson
peteharverson deleted the ml-mocha-to-jest-tests branch April 14, 2020 16:49
peteharverson added a commit to peteharverson/kibana that referenced this pull request Apr 14, 2020
* [ML] Converts utils Mocha tests to Jest

* [ML] Remove unused imports

* [ML] Switch out enzyme mount for react testing library render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
peteharverson added a commit that referenced this pull request Apr 14, 2020
* [ML] Converts utils Mocha tests to Jest

* [ML] Remove unused imports

* [ML] Switch out enzyme mount for react testing library render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 15, 2020
* master: (29 commits)
  Add test:jest_integration npm script (elastic#62938)
  [data.search.aggs] Remove service getters from agg types (AggConfig part) (elastic#62548)
  [Discover] Fix broken setting of bucketInterval (elastic#62939)
  Disable adding conditions when in alert management context. (elastic#63514)
  [Alerting] fixes to allow pre-configured actions to be executed (elastic#63432)
  adding useMemo (elastic#63504)
  [Maps] fix double fetch when filter pill is added (elastic#63024)
  [Lens] Fix missing formatting bug in "break down by" (elastic#63288)
  [SIEM] [Cases] Removed double pasted line (elastic#63507)
  [Reporting] Improve functional test steps (elastic#63259)
  [SIEM][CASE] Tests for server's configuration API (elastic#63099)
  [SIEM] [Cases] Case container unit tests (elastic#63376)
  [ML] Improving parsing of large uploaded files (elastic#62970)
  [ML] Listing global calendars on the job management page (elastic#63124)
  [Ingest][Endpoint] Add Ingest rest api response types for use in Endpoint (elastic#63373)
  Add help text to form fields (elastic#63165)
  [ML] Converts utils Mocha tests to Jest (elastic#63132)
  [Metrics UI] Refactor With* containers to hooks (elastic#59503)
  [NP] Migrate logstash server side code to NP (elastic#63135)
  Clicking cancel in saved query save modal doesn't close it (elastic#62774)
  ...
wayneseymour pushed a commit that referenced this pull request Apr 15, 2020
* [ML] Converts utils Mocha tests to Jest

* [ML] Remove unused imports

* [ML] Switch out enzyme mount for react testing library render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* [ML] Converts utils Mocha tests to Jest

* [ML] Remove unused imports

* [ML] Switch out enzyme mount for react testing library render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml release_note:skip Skip the PR/issue when compiling release notes review v7.8.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants