diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..97e615d --- /dev/null +++ b/jest.config.js @@ -0,0 +1,15 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/tests/**/*.spec.ts'], + collectCoverageFrom: [ + '/src/**/*.ts', + '!/src/types/**/*.ts', + ], + globals: { + 'ts-jest': { + diagnostics: false, + isolatedModules: true, + }, + }, +}; diff --git a/tsconfig.json b/tsconfig.json index d13bdbb..739e9cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* 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. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ @@ -111,8 +111,6 @@ "./types/**/*", "./src/**/*.js", "./src/**/*.ts", - "./test/**/*.ts", - "./test/**/*.js", "./tests/**/*.ts", "./tests/**/*.js" ],