You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/02/13 00:56:37 UTC
(superset) branch fix/jest-nested-node-modules-esm created (now 9928251e649)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a change to branch fix/jest-nested-node-modules-esm
in repository https://gitbox.apache.org/repos/asf/superset.git
at 9928251e649 fix(jest): ignore storybook-static and package __mocks__ directories
This branch includes the following new commits:
new 9928251e649 fix(jest): ignore storybook-static and package __mocks__ directories
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(jest): ignore storybook-static and package __mocks__ directories
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch fix/jest-nested-node-modules-esm
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 9928251e64938454f7f38b03884b819f8e93013e
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Thu Feb 12 16:56:19 2026 -0800
fix(jest): ignore storybook-static and package __mocks__ directories
Jest was encountering issues when running tests locally:
1. **Haste module naming collision**: storybook-static/package.json
contains `"name": "superset"` which conflicts with the main
package.json, causing "Haste module naming collision: superset"
2. **Duplicate manual mock warnings**: packages/superset-ui-core/__mocks__/
contains the same mock files as spec/__mocks__/, causing
"duplicate manual mock found" warnings for mockExportObject,
mockExportString, and svgrMock
These issues were causing local test runs to fail or behave
inconsistently. Adding these directories to modulePathIgnorePatterns
resolves both issues.
Co-Authored-By: Claude Opus 4.5 <no...@anthropic.com>
---
superset-frontend/jest.config.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/superset-frontend/jest.config.js b/superset-frontend/jest.config.js
index bd9b636f89b..8b3f92d70fd 100644
--- a/superset-frontend/jest.config.js
+++ b/superset-frontend/jest.config.js
@@ -42,6 +42,9 @@ module.exports = {
'<rootDir>/packages/.*/lib',
'<rootDir>/plugins/.*/esm',
'<rootDir>/plugins/.*/lib',
+ // Ignore build artifacts that contain duplicate package.json or mock files
+ '<rootDir>/storybook-static',
+ '<rootDir>/packages/.*/__mocks__',
],
setupFilesAfterEnv: ['<rootDir>/spec/helpers/setup.ts'],
snapshotSerializers: ['@emotion/jest/serializer'],