Files
orionprotocol-sdk/jest.config.ts
Aleksandr Kraiz 8588b55725 ESM
2023-03-31 17:47:56 +04:00

24 lines
586 B
TypeScript

import type { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts'],
modulePathIgnorePatterns: ['lib', 'node_modules'],
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
},
};
export default config;