From e5f17ae4dc1b46c33da16d9e1e5f817a2bacfc7c Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 25 Oct 2021 20:36:01 +0200 Subject: [PATCH] fixed flaky test in transport (#1186) --- test/transport/core.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/transport/core.test.js b/test/transport/core.test.js index bc997e18e..c307ed9c4 100644 --- a/test/transport/core.test.js +++ b/test/transport/core.test.js @@ -223,8 +223,11 @@ test('autoEnd = false', async ({ equal, same, teardown }) => { worker: { autoEnd: false } }) teardown(transport.end.bind(transport)) + await once(transport, 'ready') + const instance = pino(transport) instance.info('hello') + await watchFileCreated(destination) equal(count, process.listenerCount('exit'))