summaryrefslogtreecommitdiff
path: root/.babelrc.js
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-08-29 22:45:53 +0200
committerWinnie Hellmann <winnie@gitlab.com>2018-12-05 09:24:42 +0100
commita8a13d3259374a1b25ca4a3e954bca563a66a532 (patch)
treefd579414080576ea8fa0305645d29d325372f6f2 /.babelrc.js
parent8cd5004b350ef342f66956c11272dad1328f6526 (diff)
downloadgitlab-ce-a8a13d3259374a1b25ca4a3e954bca563a66a532.tar.gz
Setup Jest test environment
Diffstat (limited to '.babelrc.js')
-rw-r--r--.babelrc.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/.babelrc.js b/.babelrc.js
index 27caf378b99..bfcc7d96634 100644
--- a/.babelrc.js
+++ b/.babelrc.js
@@ -35,4 +35,10 @@ if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
plugins.push('babel-plugin-rewire');
}
+// Jest is running in node environment
+if (BABEL_ENV === 'jest') {
+ plugins.push('transform-es2015-modules-commonjs');
+ plugins.push('dynamic-import-node');
+}
+
module.exports = { presets, plugins };