Skip to content

Commit

Permalink
test: in index.js, unref timers, so test suite exits
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Aug 14, 2024
1 parent 214a32c commit 60263e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 60263e7

Please sign in to comment.