fix(tests): exclude compiled esm/lib directories from jest

Add modulePathIgnorePatterns to exclude compiled output directories
(esm/ and lib/) in packages and plugins from being tested by jest.
These directories contain transpiled build artifacts that have issues
with _jsx references in jest.mock() calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-01-18 16:05:37 -08:00
parent 4f1da90bc0
commit 0ec29bdd67

View File

@@ -36,7 +36,13 @@ module.exports = {
'^@apache-superset/core/(.*)$': '<rootDir>/packages/superset-core/src/$1',
},
testEnvironment: '<rootDir>/spec/helpers/jsDomWithFetchAPI.ts',
modulePathIgnorePatterns: ['<rootDir>/packages/generator-superset'],
modulePathIgnorePatterns: [
'<rootDir>/packages/generator-superset',
'<rootDir>/packages/.*/esm',
'<rootDir>/packages/.*/lib',
'<rootDir>/plugins/.*/esm',
'<rootDir>/plugins/.*/lib',
],
setupFilesAfterEnv: ['<rootDir>/spec/helpers/setup.ts'],
snapshotSerializers: ['@emotion/jest/serializer'],
testEnvironmentOptions: {