Files
payloadcms/jest.components.config.js
James Mikrut c11bcd1416 feat: swc register (#1779)
* feat: implements esbuild and removes babel

* chore: implements esbuild-register

* chore: tests passing

* chore: implements @swc/jest for tests

* feat: implements swc

* chore: removes build and relies on swc/register only

* chore: converts some exports

* chore: flattens ts configs

* chore: allows tsx in swc

* chore: converts more exports into js

* chore: restores payload module.exports

* chore: removes unused dependency
2023-01-04 10:11:26 -05:00

18 lines
531 B
JavaScript

module.exports = {
verbose: true,
testTimeout: 15000,
testRegex: '(/src/admin/.*\\.(test|spec))\\.[jt]sx?$',
setupFilesAfterEnv: ['<rootDir>/test/componentsSetup.js'],
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
testPathIgnorePatterns: [
'node_modules',
'dist',
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/src/webpack/mocks/fileMock.js',
'\\.(css|scss)$': '<rootDir>/src/webpack/mocks/emptyModule.js',
},
};