Commit 224417e2 authored by Phil Hughes's avatar Phil Hughes Committed by Filipa Lacerda

Added GraphQL Jest transform

parent b0097199
No related merge requests found
......@@ -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',
},
......
......@@ -72,6 +72,7 @@
"graphql": "^14.0.2",
"imports-loader": "^0.8.0",
"jed": "^1.1.1",
"jest-transform-graphql": "^2.1.0",
"jquery": "^3.2.1",
"jquery-ujs": "1.2.2",
"jquery.waitforimages": "^2.2.0",
......
export default '';
......@@ -6371,6 +6371,11 @@ jest-snapshot@^23.6.0:
pretty-format "^23.6.0"
semver "^5.5.0"
jest-transform-graphql@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/jest-transform-graphql/-/jest-transform-graphql-2.1.0.tgz#903cb66bb27bc2772fd3e5dd4f7e9b57230f5829"
integrity sha1-kDy2a7J7wncv0+XdT36bVyMPWCk=
jest-util@^23.4.0:
version "23.4.0"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment