summaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-26 12:26:15 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-02-26 12:26:15 +0000
commit224417e2b41b57ba9c0f1c6d14c1fefdb1410073 (patch)
tree88eabedcd8c3072e9999eaf9063a3187a0c83499 /jest.config.js
parentb0097199a329c4de4eacc99a7d46d62c4ec0a1e0 (diff)
downloadgitlab-ce-224417e2b41b57ba9c0f1c6d14c1fefdb1410073.tar.gz
Added GraphQL Jest transform
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js
index 3fa39dd7e8d..5ee56b244c7 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -20,6 +20,7 @@ module.exports = {
'^ee(.*)$': '<rootDir>/ee/app/assets/javascripts$1',
'^helpers(.*)$': '<rootDir>/spec/frontend/helpers$1',
'^vendor(.*)$': '<rootDir>/vendor/assets/javascripts$1',
+ '\\.(jpg|jpeg|png|svg)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
},
collectCoverageFrom: ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/coverage-frontend/',
@@ -30,6 +31,7 @@ module.exports = {
setupTestFrameworkScriptFile: '<rootDir>/spec/frontend/test_setup.js',
restoreMocks: true,
transform: {
+ '^.+\\.(gql|graphql)$': 'jest-transform-graphql',
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
},