jest tests

This commit is contained in:
Matthieu Morin 2024-06-01 14:39:23 +02:00
parent 4bbbf68f64
commit 7a54de2d48
2 changed files with 16 additions and 3 deletions

15
jest.config.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/tests/**/*.spec.ts'],
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
'!<rootDir>/src/types/**/*.ts',
],
globals: {
'ts-jest': {
diagnostics: false,
isolatedModules: true,
},
},
};

View File

@ -11,7 +11,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */ /* Language and Environment */
"target": "esnext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "target": "ES6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */ // "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
@ -111,8 +111,6 @@
"./types/**/*", "./types/**/*",
"./src/**/*.js", "./src/**/*.js",
"./src/**/*.ts", "./src/**/*.ts",
"./test/**/*.ts",
"./test/**/*.js",
"./tests/**/*.ts", "./tests/**/*.ts",
"./tests/**/*.js" "./tests/**/*.js"
], ],