Skip to content

Commit

Permalink
do not process exit under jest
Browse files Browse the repository at this point in the history
  • Loading branch information
williamstein committed Aug 25, 2023
1 parent f600617 commit 27ec840
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

- [ ] #now redo logging to use the debug module
- [ ] support node v20
- See https://github.com/sagemathinc/websocketfs/issues/1
- May be entirely an issue for unit testing.

# DONE


- [x] there are a bunch of TODO's in the code still -- read them; delete ones that aren't relevant or address, or leave ones that may matter later. Result: most of the worrisome ones are in copy functions that FUSE doesn't use.
- [x] Remove all auth (was: support auth, i.e., an optional symmetric key that clients must present to be allowed to mount the filesystem. This is useful for "defense in depth".). It's better to do the auth at a different level.
- [x] delete the "WEB" comments in code...
Expand Down
5 changes: 3 additions & 2 deletions lib/fuse/bind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export default async function bind(source: string, target: string) {
const exitHandler = async () => {
server.end();
await unmount();
process.exit();
if (process.env.JEST_WORKER_ID == null) {
process.exit();
}
};

process.on("exit", exitHandler);
Expand All @@ -24,7 +26,6 @@ export default async function bind(source: string, target: string) {
unmount: async () => {
server.end();
await unmount();
process.exit();
},
fuse,
server,
Expand Down

0 comments on commit 27ec840

Please sign in to comment.