get e2e and dev to work with test as new root directory

This commit is contained in:
Alessio Gravili
2024-03-19 11:31:50 -04:00
parent 9877fe2eed
commit 72c6200f17
103 changed files with 153 additions and 48 deletions

21
test/jest.config.js Normal file
View File

@@ -0,0 +1,21 @@
/** @type {import('jest').Config} */
const customJestConfig = {
extensionsToTreatAsEsm: ['.ts', '.tsx'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/helpers/mocks/emptyModule.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/test/helpers/mocks/fileMock.js',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
reporters: ['default', ['github-actions', { silent: false }], 'summary'],
testEnvironment: 'node',
testMatch: ['<rootDir>/**/*int.spec.ts'],
testTimeout: 90000,
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest'],
},
verbose: true,
}
export default customJestConfig