test: update packages/ test configs

This commit is contained in:
Elliot DeNolf
2024-03-16 07:34:49 -04:00
parent 145a3b7ee4
commit 1ab27e8fe3
4 changed files with 14 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
/** @type {import('jest').Config} */ /** @type {import('jest').Config} */
const customJestConfig = { const customJestConfig = {
extensionsToTreatAsEsm: ['.ts', '.tsx'], extensionsToTreatAsEsm: ['.ts', '.tsx'],
setupFilesAfterEnv: ['./test/jest.setup.ts'], setupFilesAfterEnv: ['<rootDir>/test/jest.setup.ts'],
moduleNameMapper: { moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/test/helpers/mocks/emptyModule.js', '\\.(css|scss)$': '<rootDir>/test/helpers/mocks/emptyModule.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':

View File

@@ -3,7 +3,7 @@ import baseConfig from '../../jest.config.js'
/** @type {import('@jest/types').Config} */ /** @type {import('@jest/types').Config} */
const customJestConfig = { const customJestConfig = {
...baseConfig, ...baseConfig,
globalSetup: null, setupFilesAfterEnv: null,
testMatch: ['**/src/**/?(*.)+(spec|test|it-test).[tj]s?(x)'], testMatch: ['**/src/**/?(*.)+(spec|test|it-test).[tj]s?(x)'],
testTimeout: 20000, testTimeout: 20000,
} }

View File

@@ -1,9 +1,9 @@
import baseConfig from '../../jest.config.js' import baseConfig from '../../jest.config.js'
/** @type {import('@jest/types').Config} */ /** @type {import('jest').Config} */
const customJestConfig = { const customJestConfig = {
...baseConfig, ...baseConfig,
globalSetup: null, setupFilesAfterEnv: null,
testMatch: ['**/src/**/?(*.)+(spec|test|it-test).[tj]s?(x)'], testMatch: ['**/src/**/?(*.)+(spec|test|it-test).[tj]s?(x)'],
testTimeout: 20000, testTimeout: 20000,
} }

View File

@@ -1,14 +1,11 @@
module.exports = { import baseConfig from '../../jest.config.js'
moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/src/webpack/mocks/emptyModule.js', /** @type {import('jest').Config} */
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': const customJestConfig = {
'<rootDir>/src/webpack/mocks/fileMock.js', ...baseConfig,
}, setupFilesAfterEnv: null,
testEnvironment: 'node', testMatch: ['**/src/**/?(*.)+(spec|test|it-test).[tj]s?(x)'],
testMatch: ['**/src/**/*.spec.ts'], testTimeout: 20000,
testTimeout: 60000,
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
},
verbose: true,
} }
export default customJestConfig