Skip to content

Commit

Permalink
fix(config/jest): ensure ts-jest escape hatch works with latest ts-jest
Browse files Browse the repository at this point in the history
  • Loading branch information
jrolfs committed Feb 27, 2023
1 parent b195b15 commit 6801d01
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,18 @@ const jestConfig = {
? Object.fromEntries(
// Ensure we can resolve the preset even when
// it's in a nested `node_modules` installation
Object.entries(require('ts-jest/presets').transform).map(
([glob, transformer]) => [
Object.entries(require('ts-jest/presets').jsWithTs.transform).map(
([glob, [transformer, options]]) => [
glob,
[require.resolve(transformer), {diagnostics: {warnOnly: true}}],
[
require.resolve(transformer),
{
...options,
diagnostics: {
warnOnly: true,
},
},
],
],
),
)
Expand Down

0 comments on commit 6801d01

Please sign in to comment.