Use `--exit` to force termination of node after tests

This commit is contained in:
Franck Royer 2021-03-22 21:36:44 +11:00
parent d1e8ba2c6e
commit 27c3668121
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,7 @@
"test:lint": "eslint src --ext .ts", "test:lint": "eslint src --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" --list-different", "test:prettier": "prettier \"src/**/*.ts\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", "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", "test:lint-proto": "buf lint",
"check-cli": "run-s test diff-integration-tests check-integration-tests", "check-cli": "run-s test diff-integration-tests check-integration-tests",
"check-integration-tests": "run-s check-integration-test:*", "check-integration-tests": "run-s check-integration-test:*",

View File

@ -91,6 +91,8 @@ describe('Waku Relay', () => {
}); });
it('Js publishes to nim', async function () { it('Js publishes to nim', async function () {
this.timeout(5000);
const message = Message.fromUtf8String('This is a message'); const message = Message.fromUtf8String('This is a message');
// TODO: nim-waku does follow the `StrictNoSign` policy hence we need to change // 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 // it for nim-waku to process our messages. Can be removed once

View File

@ -79,6 +79,7 @@ export class NimWaku {
public stop() { public stop() {
this.process ? this.process.kill('SIGINT') : null; this.process ? this.process.kill('SIGINT') : null;
this.process = undefined;
} }
async waitForLog(msg: string) { async waitForLog(msg: string) {