From 0ec29bdd67d9e170bbbd98d732cc29014ebb3b43 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Sun, 18 Jan 2026 16:05:37 -0800 Subject: [PATCH] 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 --- superset-frontend/jest.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/superset-frontend/jest.config.js b/superset-frontend/jest.config.js index ca8c56ee12a..75634bd9158 100644 --- a/superset-frontend/jest.config.js +++ b/superset-frontend/jest.config.js @@ -36,7 +36,13 @@ module.exports = { '^@apache-superset/core/(.*)$': '/packages/superset-core/src/$1', }, testEnvironment: '/spec/helpers/jsDomWithFetchAPI.ts', - modulePathIgnorePatterns: ['/packages/generator-superset'], + modulePathIgnorePatterns: [ + '/packages/generator-superset', + '/packages/.*/esm', + '/packages/.*/lib', + '/plugins/.*/esm', + '/plugins/.*/lib', + ], setupFilesAfterEnv: ['/spec/helpers/setup.ts'], snapshotSerializers: ['@emotion/jest/serializer'], testEnvironmentOptions: {