From 27c36681210c010f6ce7d473abfc7748e229aac5 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 22 Mar 2021 21:36:44 +1100 Subject: [PATCH] Use `--exit` to force termination of node after tests --- package.json | 2 +- src/lib/waku_relay.spec.ts | 2 ++ src/test_utils/nim_waku.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b9ae8cea77..355c6c07e3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test:lint": "eslint src --ext .ts", "test:prettier": "prettier \"src/**/*.ts\" --list-different", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", - "test:unit": "nyc --silent mocha", + "test:unit": "nyc --silent mocha --exit", "test:lint-proto": "buf lint", "check-cli": "run-s test diff-integration-tests check-integration-tests", "check-integration-tests": "run-s check-integration-test:*", diff --git a/src/lib/waku_relay.spec.ts b/src/lib/waku_relay.spec.ts index dc2bd039ee..1e92dc3394 100644 --- a/src/lib/waku_relay.spec.ts +++ b/src/lib/waku_relay.spec.ts @@ -91,6 +91,8 @@ describe('Waku Relay', () => { }); it('Js publishes to nim', async function () { + this.timeout(5000); + const message = Message.fromUtf8String('This is a message'); // TODO: nim-waku does follow the `StrictNoSign` policy hence we need to change // it for nim-waku to process our messages. Can be removed once diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index 89d2b37f88..805be37419 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -79,6 +79,7 @@ export class NimWaku { public stop() { this.process ? this.process.kill('SIGINT') : null; + this.process = undefined; } async waitForLog(msg: string) {