You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Pawansingh3889 (via GitHub)" <gi...@apache.org> on 2026/07/07 18:29:42 UTC
[PR] fix(frontend): jest testRegex matches Windows path separators [superset]
Pawansingh3889 opened a new pull request, #41863:
URL: https://github.com/apache/superset/pull/41863
### SUMMARY
On native Windows, the frontend test suite silently collects zero tests:
```
> npx jest src/utils/findPermission.test.ts
No tests found, exiting with code 1
3770 files checked.
testRegex: ... - 0 matches
```
The `testRegex` in `superset-frontend/jest.config.js` only recognises forward slashes (`\/superset-frontend\/...`), but on Windows jest matches the pattern against backslash-separated absolute paths, so no file can ever match. Every Windows contributor either believes there are no tests or works around it with a CLI `--testRegex` override.
The fix replaces each literal separator with the two-character class `[/\]`, which matches either separator. On POSIX the regex accepts exactly the same set of paths as before (the class still matches `/`, anchors and the rest of the pattern are untouched), so CI behavior is unchanged.
Verified on Windows 11: test collection goes from 0 of 3770 files to 1118 test files with the default config, and suites execute (`npx jest findPermission`: 3 passed).
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable (build tooling).
### TESTING INSTRUCTIONS
On any OS: `npx jest --listTests` from `superset-frontend/` should list the suite (1118 files currently). On Linux/macOS the list is identical before and after this change; on Windows it was previously empty.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): jest testRegex matches Windows path separators [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41863:
URL: https://github.com/apache/superset/pull/41863#issuecomment-4907310200
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41863?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.71%. Comparing base ([`8e98ae7`](https://app.codecov.io/gh/apache/superset/commit/8e98ae701b5cb5b9d17e470d03345b497f61c764?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`16cc74e`](https://app.codecov.io/gh/apache/superset/commit/16cc74e5211a5e6d2438775cee770c4f14252de5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 3 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41863 +/- ##
=======================================
Coverage 64.70% 64.71%
=======================================
Files 2701 2701
Lines 149839 149839
Branches 34497 34497
=======================================
+ Hits 96957 96964 +7
+ Misses 51107 51100 -7
Partials 1775 1775
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41863/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/41863/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.74% <ø> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41863?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): jest testRegex matches Windows path separators [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41863:
URL: https://github.com/apache/superset/pull/41863#issuecomment-4907178813
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(frontend): jest testRegex matches Windows path separators [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41863:
URL: https://github.com/apache/superset/pull/41863
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org