mirror of
https://github.com/apache/superset.git
synced 2026-05-07 00:44:26 +00:00
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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user