Skip to content

Commit

Permalink
Wait for processed files in metro-file-map (#1358)
Browse files Browse the repository at this point in the history
Summary:
`FSREQPROMISE` is the garbage collected portion caused by
```
https://github.com/facebook/metro/blob/main/packages/metro-file-map/src/worker.js#L122
```
We don't really need to ensure it's destroyed to tell the server is torn down

Pull Request resolved: #1358

Reviewed By: huntie

Differential Revision: D63697526

Pulled By: vzaidman

fbshipit-source-id: faefd1c28a505c4c017dbb531728eee9594b6856
  • Loading branch information
vzaidman authored and facebook-github-bot committed Oct 1, 2024
1 parent ed84760 commit 2817636
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('Server torn down test', () => {
'Timeout',
'TickObject',
'FSREQCALLBACK',
'FSREQPROMISE',
'FSEVENTWRAP',
'SIGNALWRAP',
].includes(type)
Expand Down Expand Up @@ -70,7 +71,8 @@ describe('Server torn down test', () => {
maybeTest(
'[macOS (darwin) only] fsevents to be destroyed after 100ms',
async () => {
// $FlowFixMe[cannot-resolve-module] - Optional, Darwin only
// imported in metro-file-map
// eslint-disable-next-line import/no-extraneous-dependencies
const fsevents = require('fsevents');

const fsEventsWatchStopper = fsevents.watch(__filename, () => {});
Expand Down

0 comments on commit 2817636

Please sign in to comment.