bigbuffet-rw/jest.config.js

46 lines
1.3 KiB
JavaScript
Raw Normal View History

const ASSET_EXTS = 'css|styl|less|sass|scss|png|jpg|svg|ogg|oga|mp3|ttf|woff|woff2';
module.exports = {
'testPathIgnorePatterns': [
'<rootDir>/node_modules/',
'<rootDir>/vendor/',
'<rootDir>/config/',
'<rootDir>/log/',
'<rootDir>/static/',
'<rootDir>/tmp/',
'<rootDir>/webpack/',
],
'setupFiles': [
'raf/polyfill',
],
'setupFilesAfterEnv': [
'<rootDir>/app/soapbox/jest/test-setup.ts',
],
'collectCoverageFrom': [
2020-05-28 15:52:07 -07:00
'app/soapbox/**/*.js',
'app/soapbox/**/*.ts',
'app/soapbox/**/*.tsx',
2020-05-28 15:52:07 -07:00
'!app/soapbox/features/emoji/emoji_compressed.js',
'!app/soapbox/locales/locale-data/*.js',
'!app/soapbox/service_worker/entry.js',
'!app/soapbox/jest/test-setup.ts',
2022-04-04 12:05:15 -07:00
'!app/soapbox/jest/test-helpers.ts',
],
2022-04-05 06:22:47 -07:00
'coverageDirectory': '<rootDir>/.coverage/',
'coverageReporters': ['html', 'text', 'text-summary', 'cobertura'],
'moduleDirectories': [
'<rootDir>/node_modules',
'<rootDir>/app',
],
2022-04-04 12:58:23 -07:00
'testMatch': ['**/*/__tests__/**/?(*.|*-)+(test).(ts|js)?(x)'],
2021-07-10 01:10:55 -07:00
'testEnvironment': 'jsdom',
'transformIgnorePatterns': [
// Ignore node_modules, except static assets
`/node_modules/(?!.+\\.(${ASSET_EXTS}))`,
],
2021-09-06 17:03:23 -07:00
'transform': {
'\\.[jt]sx?$': 'babel-jest',
[`.+\\.(${ASSET_EXTS})$`]: '<rootDir>/jest/assetTransformer.js',
2021-09-06 17:03:23 -07:00
},
};