diff --git a/.gitignore b/.gitignore index a64870e9ab0b513854037c56105ce2bf665df9d6..33f4a0ad64ae56bb17d14283e912901e2cf6bed9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ logs *.log.* npm-debug.log* .audit.json +*-audit.json # Runtime data pids diff --git a/package-lock.json b/package-lock.json index 710146bbb946e8db89e0aa2dbea985acc8cd89fc..e924536ea8e144340659e7c54e2a1862df826499 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2674,6 +2674,12 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha1-Gsig2Ug4SNFpXkGLbQMaPDzmjjs=", + "dev": true + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -3063,6 +3069,15 @@ "isexe": "^2.0.0" } }, + "why-is-node-running": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.0.3.tgz", + "integrity": "sha512-XmzbFN2T859avcs5qAsiiK1iu0nUpSUXRgiGsoHPcNijxhIlp1bPQWQk6ANUljDWqBtAbIR2jF1HxR0y2l2kCA==", + "dev": true, + "requires": { + "stackback": "0.0.2" + } + }, "winston": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.1.0.tgz", diff --git a/package.json b/package.json index 000fab993b50e4208a46e4ee0d526e65c0233340..3eb9148669afa70b55ef126eed6dc3d3e3e6d204 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "eslint": "^3.8.1", "istanbul": "^0.4.5", "mocha": "^5.2.0", - "proxyquire": "^1.7.11" + "proxyquire": "^1.7.11", + "why-is-node-running": "^2.0.3" } } diff --git a/test/config.ts b/test/config.ts index 12cd897f25bf3240306be2559b30a9271a3ed35f..611df1d675b7196cca50611e9c31221b4b87fbd7 100644 --- a/test/config.ts +++ b/test/config.ts @@ -1,5 +1,8 @@ -import {argv} from "process"; -import {Log} from "../src/log"; +import { argv } from "process"; +import { Log } from "../src/log"; +import * as WhyRunning from "why-is-node-running"; + +const logger = new Log("MessageProcessor"); // we are a test file and thus need those /* tslint:disable:no-unused-expression max-file-line-count */ @@ -7,3 +10,7 @@ import {Log} from "../src/log"; if (!argv.includes("--noisy")) { Log.ForceSilent(); } + +after(() => { + WhyRunning(); +}); diff --git a/test/mocha.opts b/test/mocha.opts index a93481d22320c95def1406620b32c228b27f0268..d968e94e07db51b9a1da60b56c819d0dfeadf90a 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,3 +1,4 @@ --reporter list --ui bdd --recursive +--expose-internals