chore: Refactor server tests to use jest
This commit is contained in:
committed by
mrugesh mohapatra
parent
4a9d22cee0
commit
438bd94895
22
api-server/jest.config.js
Normal file
22
api-server/jest.config.js
Normal file
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
moduleNameMapper: {
|
||||
'\\.(jpg|jpeg|png|svg|woff|woff2)$': '<rootDir>/src/__mocks__/fileMock.js',
|
||||
// Plain CSS - match css files that don't end with
|
||||
// '.module.css' https://regex101.com/r/VzwrKH/4
|
||||
'^(?!.*\\.module\\.css$).*\\.css$': '<rootDir>/src/__mocks__/styleMock.js',
|
||||
// CSS Modules - match files that end with 'module.css'
|
||||
'\\.module\\.css$': 'identity-obj-proxy',
|
||||
analytics: '<rootDir>/src/__mocks__/analyticsMock.js'
|
||||
},
|
||||
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/.cache/'],
|
||||
globals: {
|
||||
__PATH_PREFIX__: ''
|
||||
},
|
||||
verbose: true,
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest'
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!(gatsby)/)'
|
||||
]
|
||||
};
|
Reference in New Issue
Block a user