From 4003266f527e34ccb9cdfc7d7aef11f2c3b405b8 Mon Sep 17 00:00:00 2001 From: Mark Brouch Date: Fri, 20 Dec 2019 10:20:03 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Configure=20jest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jest.config.js | 7 +++++++ src/.eslintrc.js | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..5661fca --- /dev/null +++ b/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + roots: ["/src"], + testMatch: ["**/__tests__/**/*.+(ts|js)", "**/?(*.)+(spec|test).+(ts|js)"], + transform: { + "^.+\\.ts$": "ts-jest" + } +}; diff --git a/src/.eslintrc.js b/src/.eslintrc.js index 18bc5f7..aa3e6f0 100644 --- a/src/.eslintrc.js +++ b/src/.eslintrc.js @@ -4,5 +4,12 @@ module.exports = { extends: [ "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" + ], + overrides: [ + { + files: ["__tests__", "**/*.spec.{js,ts}"], + plugins: ["jest"], + extends: ["plugin:jest/recommended", "plugin:jest/style"] + } ] };