From 45afbcd063182ec9ab4a6f63316b73ef36365ec3 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 14 Oct 2024 18:18:16 +0200 Subject: [PATCH] fixup Signed-off-by: Matteo Collina --- package.json | 3 ++- test/envPort.test.js | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 64a5638c..d28fa010 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,8 @@ "sinon": "^15.0.0", "split2": "^4.0.0", "standard": "^17.0.0", - "tap": "^16.0.0" + "tap": "^16.0.0", + "why-is-node-running": "^2.3.0" }, "dependencies": { "@minimistjs/subarg": "^1.0.0", diff --git a/test/envPort.test.js b/test/envPort.test.js index 2f04b199..5f635960 100644 --- a/test/envPort.test.js +++ b/test/envPort.test.js @@ -1,11 +1,16 @@ 'use strict' +const why = require('why-is-node-running') const t = require('tap') const split = require('split2') const path = require('path') const childProcess = require('child_process') const helper = require('./helper') +setInterval(function () { + console.log(why()) +}, 30000).unref() + const lines = [ /Running 1s test @ .*$/, /10 connections.*$/, @@ -46,7 +51,9 @@ const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..'), }) t.teardown(() => { - child.kill() + try { + child.kill() + } catch {} }) child