forked from opensearch-project/dashboards-observability
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert jest tests config to use babel (opensearch-project#1319)
* update jest config to use babel instead of ts-jest Signed-off-by: Shenoy Pratik <[email protected]> * remove ts-jest package Signed-off-by: Shenoy Pratik <[email protected]> * update yarn lock Signed-off-by: Shenoy Pratik <[email protected]> --------- Signed-off-by: Shenoy Pratik <[email protected]>
- Loading branch information
Showing
6 changed files
with
106 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
// babelrc doesn't respect NODE_PATH anymore but using require does. | ||
// 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')) { | ||
return { | ||
presets: [ | ||
require('@babel/preset-env'), | ||
require('@babel/preset-react'), | ||
require('@babel/preset-typescript'), | ||
], | ||
plugins: [ | ||
[require('@babel/plugin-transform-runtime'), { regenerator: true }], | ||
require('@babel/plugin-transform-class-properties'), | ||
require('@babel/plugin-transform-object-rest-spread'), | ||
[require('@babel/plugin-transform-modules-commonjs'), { allowTopLevelThis: true }], | ||
], | ||
}; | ||
} | ||
return {}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.