From 1af57575d3f7a0ef63e04bcac231b38b1868182a Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 11 Sep 2018 16:54:32 -0700 Subject: [PATCH] Allow Jest to process .ts files --- config/jest.unit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/jest.unit.js b/config/jest.unit.js index d90efe97..d5e43640 100644 --- a/config/jest.unit.js +++ b/config/jest.unit.js @@ -5,9 +5,13 @@ module.exports = { globals: { SENTRY_DSN: null }, + moduleFileExtensions: ["js", "ts"], moduleNameMapper: { "\\.css$": "/js/__mocks__/styleMock.js", "\\.wsz$": "/js/__mocks__/fileMock.js", "\\.mp3$": "/js/__mocks__/fileMock.js" + }, + transform: { + "^.+\\.(js|ts)$": "babel-jest" } };