From a35f4291e0e55d65405aea4460bd50a06a32ea7c Mon Sep 17 00:00:00 2001 From: Nick Owen Date: Mon, 5 Nov 2018 15:58:16 +0000 Subject: [PATCH] test: Remove erroneous warning diagnostic The module value in tsconfig is like `esnext` and erroneously triggers a diagnostic warning, as shown in this issue: https://github.com/kulshekhar/ts-jest/issues/748 --- jest.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jest.config.js b/jest.config.js index e97b0da..d05d74f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,13 @@ +// Module value in tsconfig is like `esnext` and erroneously triggers a diagnostic warning +// https://github.com/kulshekhar/ts-jest/issues/748 +const tsJestIgnore = { + 'ts-jest': { + diagnostics: { + ignoreCodes: [151001], + }, + }, +} + module.exports = { roots: [ '/src' @@ -7,4 +17,7 @@ module.exports = { }, testRegex: '(/__tests__/.*|(\\.|/)test)\\.ts?$', moduleFileExtensions: ['ts', 'js'], + globals: { + ...tsJestIgnore, + }, } \ No newline at end of file