From aa6e4d5b30264da7c8293379db658728114a8b67 Mon Sep 17 00:00:00 2001 From: Mina Nagy Zaki Date: Tue, 13 Aug 2019 23:02:54 +0200 Subject: [PATCH] chore(e2e): update jest config --- e2e/jest.config.js | 37 ++++++++++++++++++++++++++++++++++++- tsconfig.json | 3 ++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/e2e/jest.config.js b/e2e/jest.config.js index 0d31ba4477..7e2cda20d3 100644 --- a/e2e/jest.config.js +++ b/e2e/jest.config.js @@ -2,5 +2,40 @@ module.exports = { "setupFilesAfterEnv": ["./init.js"], "testEnvironment": "node", "reporters": ["detox/runners/jest/streamlineReporter"], - "verbose": true + "verbose": true, + + globals: { + "ts-jest": { + babelConfig: true, + diagnostics: { + warnOnly: true + } + } + }, + + moduleNameMapper: { + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/tests/assetsTransformer.js" + }, + + moduleFileExtensions: [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ], + + moduleDirectories: [ + "/../node_modules", + "/.." + ], + + testPathIgnorePatterns: [ + "/node_modules/.*" + ], + + transform: { + "^.+\\.tsx?$": "ts-jest" + } } diff --git a/tsconfig.json b/tsconfig.json index 3bd6ac8d57..073bcd23ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,6 +27,7 @@ "include": [ "./src/**/*", "./tests/**/*", - "./bin/**/*" + "./bin/**/*", + "./e2e/**/*" ] }