rusackas opened a new pull request, #37946:
URL: https://github.com/apache/superset/pull/37946
## Summary
Fixes local Jest test runs that were failing with confusing errors due to
duplicate files being scanned.
### Issues Fixed
1. **Haste module naming collision**
```
jest-haste-map: Haste module naming collision: superset
* <rootDir>/package.json
* <rootDir>/storybook-static/package.json
```
The `storybook-static/` build artifact contains a copy of `package.json`
with `"name": "superset"`, causing Jest's Haste module resolver to fail.
2. **Duplicate manual mock warnings**
```
jest-haste-map: duplicate manual mock found: mockExportObject
* <rootDir>/spec/__mocks__/mockExportObject.js
* <rootDir>/packages/superset-ui-core/__mocks__/mockExportObject.js
```
The `packages/superset-ui-core/__mocks__/` directory contains copies of
the canonical mocks in `spec/__mocks__/`, causing ambiguity.
### Solution
Add these directories to `modulePathIgnorePatterns` in `jest.config.js`:
- `<rootDir>/storybook-static` - build artifact directory
- `<rootDir>/packages/.*/__mocks__` - package-level mocks (canonical mocks
are in `spec/__mocks__/`)
## Test Plan
- [x] Ran `npx jest --testPathPatterns="deckgl"` - all 273 tests pass
- [x] No more Haste naming collision or duplicate mock warnings
🤖 Generated with [Claude Code](https://claude.ai/code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]