From feb6cd740e182755201e12ecafbd6fdf0ec7b66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Thu, 3 Oct 2024 16:07:26 +0200 Subject: [PATCH] Assert that client closes --- test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index 6142f3d..02c6144 100644 --- a/test.js +++ b/test.js @@ -5,7 +5,7 @@ const Pipe = require('.') const isWindows = Bare.platform === 'win32' test('server + client', async (t) => { - t.plan(2) + t.plan(3) const n = name() @@ -23,7 +23,9 @@ test('server + client', async (t) => { .listen(n) const client = new Pipe(n) - client.end('hello pipe') + client + .on('close', () => t.pass('client closed')) + .end('hello pipe') await lc