Skip to content

fix: preserve FIFO descriptors when respawning - #6254

Merged
mark-wiemer merged 1 commit into
mochajs:mainfrom
JoshuaKGoldberg:fix/fifo-process-substitution
Aug 31, 2026
Merged

mark-wiemer merged 1 commit into
mochajs:mainfrom
JoshuaKGoldberg:fix/fifo-process-substitution

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

PR Checklist

Overview

Applies a filter to mochaArgs._ to capture /dev/fd/* inputs. If one is found, we append its number and repam to /dev/fd/ + that number.

I really, really didn't want to have to do things this way - it's super spooky to remap strings. But I couldn't figure out another approach. 🤷

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.81%. Comparing base (505b5e9) to head (ba9cad8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
bin/mocha.js 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6254      +/-   ##
==========================================
- Coverage   81.93%   81.81%   -0.12%     
==========================================
  Files          64       64              
  Lines        4866     4873       +7     
  Branches     1100     1073      -27     
==========================================
  Hits         3987     3987              
- Misses        879      886       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mark-wiemer

Copy link
Copy Markdown
Member

Lgtm, good find, good fix

@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review August 31, 2026 12:55
@mark-wiemer
mark-wiemer merged commit 3bb317d into mochajs:main Aug 31, 2026
299 of 302 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Mocha 12 RC 6 still doesn't support piped FIFO files

2 participants