Skip to content

Commit

Permalink
make sure Jest closes all open handles
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcelhaney committed Aug 21, 2023
1 parent 41a1749 commit 4d2b0f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .rtx.toml
@@ -0,0 +1,2 @@
[tools]
node = "18"
5 changes: 5 additions & 0 deletions test/server/counterfact.test.js
Expand Up @@ -134,5 +134,10 @@ describe("integration test", () => {

await moduleLoader.stopWatching();
});

// eslint-disable-next-line promise/avoid-new
await new Promise((resolve) => {
proxyTarget.close(resolve);
});
});
});
5 changes: 4 additions & 1 deletion test/typescript-generator/specification.test.js
Expand Up @@ -57,7 +57,10 @@ describe("a Specification", () => {
hello: "world",
});

await server.close();
// eslint-disable-next-line promise/avoid-new
await new Promise((resolve) => {
server.close(resolve);
});
});

it("returns a requirement for a URL", async () => {
Expand Down

0 comments on commit 4d2b0f8

Please sign in to comment.