graphql-engine/console/jest.config.js
Nicolas Beaussart 4c8687fdab console: add form library components
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2421
Co-authored-by: Martin Mark <74692114+martin-hasura@users.noreply.github.com>
GitOrigin-RevId: 52dc6e600ebc174616e3f408c4394a3993b6dae7
2021-10-07 09:51:10 +00:00

37 lines
957 B
JavaScript

module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.(ts|tsx|js|jsx)?$': 'ts-jest',
'^.+\\.svg$': 'jest-svg-transformer',
},
testRegex: '(/__tests__/.*)\\.(test|spec).[jt]sx?$',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleDirectories: ['node_modules', 'src'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
__DEV__: true,
CONSOLE_ASSET_VERSION: Date.now().toString(),
'process.hrtime': () => null,
__DEVELOPMENT__: true,
__CLIENT__: true,
__SERVER__: true,
__DISABLE_SSR__: true,
__DEVTOOLS__: true,
socket: true,
webpackIsomorphicTools: true,
window: {
__env: {
nodeEnv: 'development',
},
},
},
};