Skip to content

Commit e8443ea

Browse files
committed
test: fix error throw check for proxy termination
1 parent d347d8c commit e8443ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/unit/proxy-terminate-test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
2828
await proxy.frontEnd.bind(uniqAddress(proto))
2929
await proxy.backEnd.bind(uniqAddress(proto))
3030

31-
setTimeout(() => proxy.terminate(), 50)
32-
await proxy.run()
33-
3431
try {
32+
const timer = setTimeout(() => proxy.terminate(), 50)
33+
await proxy.run()
34+
3535
await proxy.terminate()
36+
timer.unref()
3637
assert.ok(false)
3738
} catch (err) {
3839
if (!isFullError(err)) {

0 commit comments

Comments
 (0)