2023-02-16 09:24:35 +09:00
|
|
|
/** @type {import('jest').Config} */
|
|
|
|
const config = {
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
testPathIgnorePatterns: [
|
2022-05-04 14:06:49 +09:00
|
|
|
'<rootDir>/node_modules/',
|
|
|
|
'<rootDir>/vendor/',
|
|
|
|
'<rootDir>/config/',
|
|
|
|
'<rootDir>/log/',
|
|
|
|
'<rootDir>/public/',
|
|
|
|
'<rootDir>/tmp/',
|
2022-05-05 02:15:50 +09:00
|
|
|
'<rootDir>/app/javascript/themes/',
|
2022-05-04 14:06:49 +09:00
|
|
|
],
|
2023-02-16 09:24:35 +09:00
|
|
|
setupFiles: ['raf/polyfill'],
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/app/javascript/mastodon/test_setup.js'],
|
|
|
|
collectCoverageFrom: [
|
2023-04-17 17:12:04 +09:00
|
|
|
'app/javascript/mastodon/**/*.{js,jsx,ts,tsx}',
|
2022-05-04 14:06:49 +09:00
|
|
|
'!app/javascript/mastodon/features/emoji/emoji_compressed.js',
|
|
|
|
'!app/javascript/mastodon/locales/locale-data/*.js',
|
|
|
|
'!app/javascript/mastodon/service_worker/entry.js',
|
|
|
|
'!app/javascript/mastodon/test_setup.js',
|
|
|
|
],
|
2023-02-16 09:24:35 +09:00
|
|
|
coverageDirectory: '<rootDir>/coverage',
|
|
|
|
moduleDirectories: ['<rootDir>/node_modules', '<rootDir>/app/javascript'],
|
2022-05-04 14:06:49 +09:00
|
|
|
};
|
2023-02-16 09:24:35 +09:00
|
|
|
|
|
|
|
module.exports = config;
|