diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-08-29 22:45:53 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-12-05 09:24:42 +0100 |
commit | a8a13d3259374a1b25ca4a3e954bca563a66a532 (patch) | |
tree | fd579414080576ea8fa0305645d29d325372f6f2 /.babelrc.js | |
parent | 8cd5004b350ef342f66956c11272dad1328f6526 (diff) | |
download | gitlab-ce-a8a13d3259374a1b25ca4a3e954bca563a66a532.tar.gz |
Setup Jest test environment
Diffstat (limited to '.babelrc.js')
-rw-r--r-- | .babelrc.js | 6 |
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 }; |