From 0414772c9c6fe84a3bee7a8673987117725b0459 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 5 Nov 2024 22:30:01 +0100 Subject: [PATCH] js: force exit ndoe --- iroh-js/__test__/_force-exit.mjs | 6 ++++++ iroh-js/package.json | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 iroh-js/__test__/_force-exit.mjs diff --git a/iroh-js/__test__/_force-exit.mjs b/iroh-js/__test__/_force-exit.mjs new file mode 100644 index 00000000..ca3e7c1c --- /dev/null +++ b/iroh-js/__test__/_force-exit.mjs @@ -0,0 +1,6 @@ +import process from 'node:process'; +import { registerCompletionHandler } from 'ava'; + +registerCompletionHandler(() => { + process.exit(); +}); diff --git a/iroh-js/package.json b/iroh-js/package.json index ff965169..b3e913cb 100644 --- a/iroh-js/package.json +++ b/iroh-js/package.json @@ -46,7 +46,10 @@ "ava": "^6.0.1" }, "ava": { - "timeout": "5m" + "timeout": "5m", + "require": [ + "./__test__/_force-exit.mjs" + ] }, "scripts": { "artifacts": "napi artifacts",