-
Notifications
You must be signed in to change notification settings - Fork 58
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
Revert jest tests config to use babel #1319
Conversation
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1319 +/- ##
==========================================
- Coverage 57.42% 51.58% -5.84%
==========================================
Files 330 305 -25
Lines 12091 10644 -1447
Branches 2792 2790 -2
==========================================
- Hits 6943 5491 -1452
- Misses 5102 5107 +5
Partials 46 46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
// Alternative to install them locally in node_modules | ||
module.exports = function (api) { | ||
// ensure env is test so that this config won't impact build or dev server | ||
if (api.env('test')) { |
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 didn't check but is babel config not needed for either build or dev?
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.
Checking
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.
This is likely used only in a testing environment (Jest) to ensure that the Babel configuration for tests is applied. I guess for bootstrap/build OSD scripts takes care of it.
* update jest config to use babel instead of ts-jest Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit a262aaf) * remove ts-jest package Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 66d5621) * update yarn.lock file Signed-off-by: Shenoy Pratik <[email protected]> * update snapshots Signed-off-by: Shenoy Pratik <[email protected]> --------- Signed-off-by: Shenoy Pratik <[email protected]>
…ect#1319) (opensearch-project#1320) * update jest config to use babel instead of ts-jest Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit a262aaf) * remove ts-jest package Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 66d5621) * update yarn.lock file Signed-off-by: Shenoy Pratik <[email protected]> * update snapshots Signed-off-by: Shenoy Pratik <[email protected]> --------- Signed-off-by: Shenoy Pratik <[email protected]>
…ect#1319) (opensearch-project#1320) * update jest config to use babel instead of ts-jest Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit a262aaf) * remove ts-jest package Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 66d5621) * update yarn.lock file Signed-off-by: Shenoy Pratik <[email protected]> * update snapshots Signed-off-by: Shenoy Pratik <[email protected]> --------- Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 2c969e3)
Description
Revert to jest tests to using babel. This PR aligns with the long term solution mentioned in the below issue.
This PR removes ts-jest dependency and aligns with all other dashboards plugins to use babel for transform.
NOTE: Some jest tests or integrations were failing after the migration. Ideally should have been caught by ts-jest earlier. cc: @Swiddis
Issues Resolved
#1306
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.