From fb70b2bf64995e0818661bd722354b29ab61e73b Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Mon, 12 Aug 2019 10:24:08 +0100 Subject: [PATCH] Configure Jest for TS --- app/package.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/package.json b/app/package.json index f8a1378d..a61647cf 100644 --- a/app/package.json +++ b/app/package.json @@ -55,5 +55,25 @@ "tslint": "^5.18.0", "tslint-react": "^4.0.0", "typescript": "^3.5.3" + }, + "jest": { + "transform": { + "\\.(ts|tsx)$": "ts-jest", + "\\.css$": "/node_modules/razzle/config/jest/cssTransform.js", + "^(?!.*\\.(js|jsx|css|json)$)": "/node_modules/razzle/config/jest/fileTransform.js" + }, + "testMatch": [ + "/src/**/__tests__/**/*.(ts|js)?(x)", + "/src/**/?(*.)(spec|test).(ts|js)?(x)" + ], + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "json" + ], + "collectCoverageFrom": [ + "src/**/*.{js,jsx,ts,tsx}" + ] } }