Skip to content

Commit 81b0f0c

Browse files
committed
feat: adding component tests - team page
1 parent 15f1210 commit 81b0f0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+15537
-6177
lines changed

babel.config.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
presets: [
3+
'@babel/preset-env',
4+
'@babel/preset-react',
5+
'@babel/preset-typescript',
6+
],
7+
}

eslint.config.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@ export default [
3434
'**/dist-ssr',
3535
'**/*.local',
3636
'node_modules/*',
37-
'**/jest.config.js',
38-
'**/node_modules',
39-
'**/.DS_Store',
40-
'**/dist',
41-
'**/dist-ssr',
42-
'**/*.local',
43-
'node_modules/*',
44-
'**/jest.config.js',
37+
'**/jest.config.cjs',
4538
],
4639
},
4740
...compat.extends(

jest.config.cjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
roots: ['src'],
3+
testEnvironment: 'jsdom',
4+
testMatch: [
5+
'**/__tests__/**/*.[jt]s?(x)',
6+
'**/?(*.)+(spec|specs|test|tests).[jt]s?(x)',
7+
],
8+
transform: {
9+
'\\.svg$': '<rootDir>/test/svg-transform.cjs',
10+
'\\.(css|scss)$': '<rootDir>/test/jest-transform-css.cjs',
11+
'^.+\\.(t|j)sx?$': [
12+
'@swc/jest',
13+
{
14+
sourceMaps: true,
15+
jsc: {
16+
transform: {
17+
react: {
18+
runtime: 'automatic',
19+
},
20+
},
21+
},
22+
},
23+
],
24+
},
25+
collectCoverageFrom: [
26+
'src/**/*.ts',
27+
'src/**/*.tsx',
28+
'!src/**/*.stories.tsx',
29+
'!src/mocks/**/*.ts',
30+
],
31+
coverageReporters: ['text', 'cobertura'],
32+
setupFilesAfterEnv: ['./test/setup-test-framework.ts'],
33+
testPathIgnorePatterns: ['/node_modules/'],
34+
moduleNameMapper: {
35+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
36+
require.resolve('./test/file-mock.ts'),
37+
'^@/(.*)$': '<rootDir>/src/$1',
38+
'\\.(css|scss)$': '<rootDir>/test/style-mock.cjs',
39+
},
40+
testEnvironmentOptions: {
41+
customExportConditions: [''],
42+
},
43+
setupFiles: ['<rootDir>/test/setup.jest.js'],
44+
}

0 commit comments

Comments
 (0)