-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
33 lines (32 loc) · 1.06 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');
module.exports = {
// プリセット
preset: 'ts-jest',
// テスト環境
testEnvironment: 'node',
// モジュール名マッパー
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
// テストパス除外
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/e2e/'],
// モジュールディレクトリ
moduleDirectories: ['node_modules', '<rootDir>/__tests__'],
// セットアップファイル
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
// 変換除外パターン
transformIgnorePatterns: ['/node_modules/(?!(uuid|@google-cloud/storage)/)'],
// レポート
reporters: [
// デフォルトレポート
"default",
// HTMLレポート
["jest-html-reporters", {
// レポートパス
publicPath: "./jest-report",
// レポートファイル名
filename: "jest-report.html",
// レポートを開く
openReport: false
}]
],
};