summaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-12-10 12:08:55 +0100
committerWinnie Hellmann <winnie@gitlab.com>2018-12-11 15:03:59 +0100
commit4b3573f2e9a2b5bc690597845e05819f224b7d4c (patch)
tree750b463cb8d2a150c3833312354ba0e8c52a122f /jest.config.js
parentb388111f6ed5181c357f5c37277f16c6ae234f5a (diff)
downloadgitlab-ce-4b3573f2e9a2b5bc690597845e05819f224b7d4c.tar.gz
Setup Jest for Vue
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js
index 23554a117f6..4dab7c2891a 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -14,6 +14,7 @@ if (process.env.CI) {
// eslint-disable-next-line import/no-commonjs
module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'],
+ moduleFileExtensions: ['js', 'json', 'vue'],
moduleNameMapper: {
'^~(.*)$': '<rootDir>/app/assets/javascripts$1',
'^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1',
@@ -26,4 +27,8 @@ module.exports = {
reporters,
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
restoreMocks: true,
+ transform: {
+ '^.+\\.js$': 'babel-jest',
+ '^.+\\.vue$': 'vue-jest',
+ },
};