summaryrefslogtreecommitdiff
path: root/babel.config.js
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-02 15:11:14 -0700
committerStan Hu <stanhu@gmail.com>2019-05-02 15:11:14 -0700
commit79890748cf653aca57b194eb4950c650b390e9a9 (patch)
treed25e96a309cae063882852a444706d40c1671d0c /babel.config.js
parent5259e75d79568946e9e49f5420caec32122cd9ff (diff)
parent206504008cb8dbcddd05545d71c644c059801250 (diff)
downloadgitlab-ce-56557-disable-kubernetes-namespace-service-account-backend.tar.gz
Merge branch 'master' into 56557-disable-kubernetes-namespace-service-account-backend56557-disable-kubernetes-namespace-service-account-backend
Diffstat (limited to 'babel.config.js')
-rw-r--r--babel.config.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/babel.config.js b/babel.config.js
index 78d14095b0b..df30892731d 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -38,8 +38,9 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
plugins.push('babel-plugin-rewire');
}
-// Jest is running in node environment
-if (BABEL_ENV === 'jest') {
+// Jest is running in node environment, so we need additional plugins
+const isJest = !!process.env.JEST_WORKER_ID;
+if (isJest) {
plugins.push('@babel/plugin-transform-modules-commonjs');
/*
without the following, babel-plugin-istanbul throws an error: