Skip to content

Commit 9bda8c8

Browse files
romtsnclaude
andcommitted
fix(jest): Inline setupTests into jest.config.js
Jest 30's new module resolver fails to find setupFiles on certain Node versions. Since setupTests.js only sets one env var, inline it directly in the config to avoid the resolution issue entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent de8c3a8 commit 9bda8c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
const path = require('path');
2+
3+
process.env.SENTRY_BINARY_PATH = path.join(__dirname, 'lib', '__mocks__', 'sentry-cli');
4+
15
module.exports = {
26
collectCoverage: true,
37
testEnvironment: 'node',
4-
setupFiles: [require.resolve('./setupTests.js')],
58
testPathIgnorePatterns: ['./src/', './tests/integration/'],
69
transform: {
710
'^.+\\.ts$': 'ts-jest',

setupTests.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)