Skip to content

Commit 1fb42dd

Browse files
committed
chore: update jest config to support typescript
1 parent 9ffcf9a commit 1fb42dd

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

jest.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

jest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { Config } from '@jest/types';
2+
3+
const config: Config.InitialOptions = {
4+
testEnvironment: 'node',
5+
testRegex: '\\.test\\.ts$',
6+
collectCoverage: true,
7+
collectCoverageFrom: ['src/**/*.ts'],
8+
coverageDirectory: 'coverage',
9+
coverageProvider: 'v8',
10+
coveragePathIgnorePatterns: ['/node_modules/', '/dist/', '<rootDir>/src/typings.ts'],
11+
transform: {
12+
'^.+\\.ts$': 'ts-jest'
13+
},
14+
moduleFileExtensions: ['ts', 'js', 'json', 'node']
15+
};
16+
17+
export default config;

0 commit comments

Comments
 (0)