From 60263e7d91775d5ee8a8f7ff21c30f06c8e3b54a Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 14 Aug 2024 08:31:34 -0700 Subject: [PATCH] test: in index.js, unref timers, so test suite exits --- CHANGELOG.md | 2 ++ index.js | 2 ++ package.json | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 922014a..ae7855e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ### [1.2.7] - 2024-08-14 +- test: in index.js, unref timers, so test suite exits + ### [1.2.6] - 2024-08-14 - mech_mx: fix incorrect evaluation of MX addresses diff --git a/index.js b/index.js index 0edf96d..baa70ef 100644 --- a/index.js +++ b/index.js @@ -118,6 +118,7 @@ exports.helo_spf = async function (next, connection, helo) { connection.loginfo(plugin, 'timeout') next() }, plugin.cfg.lookup_timeout * 1000) + timer.unref() try { const result = await spf.check_host(connection.remote.ip, helo, null) @@ -203,6 +204,7 @@ exports.hook_mail = async function (next, connection, params) { connection.loginfo(plugin, 'timeout') next() }, plugin.cfg.lookup_timeout * 1000) + timer.unref() spf.helo = connection.hello?.host diff --git a/package.json b/package.json index 3f57efc..4cc504f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "lint:fix": "npx eslint@^8 --fix *.js bin/spf lib test", "prettier": "npx prettier . --check", "prettier:fix": "npx prettier . --write --log-level=warn", - "test": "npx mocha@10 --exit", + "test": "npx mocha@10", "versions": "npx dependency-version-checker check", "versions:fix": "npx dependency-version-checker update && npm run prettier:fix" },