Skip to content

Commit 7e7f034

Browse files
committed
fix(e2e): ensure NWCClient is closed in finally block
1 parent dbb933b commit 7e7f034

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

e2e/nwc-faucet.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ describe("NWC faucet integration", () => {
1717
const { nwcUrl } = await createTestWallet(EXPECTED_BALANCE_SATS, 3);
1818

1919
const nwc = new NWCClient({ nostrWalletConnectUrl: nwcUrl });
20-
const result = await nwc.getBalance();
21-
nwc.close();
22-
23-
expect(result.balance).toBe(EXPECTED_BALANCE_MSATS);
20+
try {
21+
const result = await nwc.getBalance();
22+
expect(result.balance).toBe(EXPECTED_BALANCE_MSATS);
23+
} finally {
24+
nwc.close();
25+
}
2426
},
2527
60_000,
2628
);

0 commit comments

Comments
 (0)