Skip to content

Commit be9a5dc

Browse files
committed
chore: added the tests
1 parent 53c4927 commit be9a5dc

File tree

8 files changed

+6807
-2768
lines changed

8 files changed

+6807
-2768
lines changed

eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,20 @@ export default [
2525
...tsPlugin.configs.recommended.rules,
2626
},
2727
},
28+
{
29+
files: [
30+
'**/*.test.ts',
31+
'**/*.test.js',
32+
'**/*.spec.ts',
33+
'**/*.spec.js',
34+
'test/**/*.ts',
35+
'test/**/*.js',
36+
],
37+
languageOptions: {
38+
globals: {
39+
...globals.jest,
40+
...globals.node,
41+
},
42+
},
43+
},
2844
];

jest.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
export default {
2+
preset: 'ts-jest/presets/default-esm',
3+
transform: {
4+
'^.+\\.m?[tj]sx?$': [
5+
'ts-jest',
6+
{
7+
useESM: true,
8+
tsconfig: 'tsconfig.jest.json',
9+
},
10+
],
11+
},
12+
testEnvironment: 'node',
13+
testMatch: ['**/*.+(spec|test).[tj]s?(x)'],
14+
moduleFileExtensions: [
15+
'ts',
16+
'tsx',
17+
'js',
18+
'mjs',
19+
'jsx',
20+
'mts',
21+
'json',
22+
'node',
23+
],
24+
testPathIgnorePatterns: ['/node_modules/', '/frontend/', '/dist/'],
25+
resetModules: false,
26+
collectCoverage: true,
27+
coverageDirectory: './build/coverage',
28+
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.d.ts'],
29+
coverageReporters: ['clover', 'cobertura', 'lcov'],
30+
coveragePathIgnorePatterns: ['/dist/', '/node_modules/'],
31+
testTimeout: 60000,
32+
globalSetup: './test/setup.js',
33+
extensionsToTreatAsEsm: ['.ts', '.tsx', '.mts'],
34+
moduleNameMapper: {
35+
'^(\\.{1,2}/.*)\\.js$': '$1',
36+
},
37+
reporters: [
38+
'default',
39+
[
40+
'jest-junit',
41+
{
42+
outputDirectory: './build/reports',
43+
outputName: 'junit.xml',
44+
},
45+
],
46+
],
47+
};

knip.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
// eslint-disable-next-line no-undef
22
module.exports = {
3-
ignoreDependencies: [
4-
//
5-
],
63
};

0 commit comments

Comments
 (0)