mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-23 22:42:16 +00:00
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
module.exports = {
|
|
roots: ['<rootDir>/src'],
|
|
collectCoverageFrom: [
|
|
'src/**/*.{js,jsx,ts,tsx}',
|
|
'!src/**/*.d.ts',
|
|
'!src/mocks/**',
|
|
// Worker client file uses "import.meta.url" and breaks coverage collector.
|
|
'!src/decrypt-worker/client.ts',
|
|
],
|
|
coveragePathIgnorePatterns: [],
|
|
setupFilesAfterEnv: ['./src/test-utils/setup-jest.ts'],
|
|
testEnvironment: 'jsdom',
|
|
modulePaths: ['<rootDir>/src'],
|
|
transform: {
|
|
'^.+\\.(ts|js|tsx|jsx)$': '@swc/jest',
|
|
},
|
|
transformIgnorePatterns: [
|
|
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
|
|
'^.+\\.module\\.(css|sass|scss)$',
|
|
],
|
|
modulePaths: ['<rootDir>/src'],
|
|
moduleNameMapper: {
|
|
'^react-native$': 'react-native-web',
|
|
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
|
|
},
|
|
moduleFileExtensions: [
|
|
// Place tsx and ts to beginning as suggestion from Jest team
|
|
// https://jestjs.io/docs/configuration#modulefileextensions-arraystring
|
|
'tsx',
|
|
'ts',
|
|
'js',
|
|
'json',
|
|
'jsx',
|
|
],
|
|
// watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
|
|
resetMocks: true,
|
|
};
|