diff --git a/package.json b/package.json index a3dadc9..09e0e30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mx-connect", - "version": "1.4.3", + "version": "1.4.4", "description": "Establish TCP connection to a MX server", "main": "lib/mx-connect.js", "scripts": { @@ -23,14 +23,14 @@ "homepage": "https://github.com/zone-eu/mx-connect#readme", "devDependencies": { "eslint-config-nodemailer": "1.2.0", - "eslint-config-prettier": "8.7.0", + "eslint-config-prettier": "8.8.0", "grunt": "1.6.1", "grunt-cli": "1.4.3", - "grunt-contrib-nodeunit": "4.0.0", - "grunt-eslint": "24.0.1" + "grunt-contrib-nodeunit": "5.0.0", + "grunt-eslint": "24.1.0" }, "dependencies": { "ipaddr.js": "2.0.1", - "mailauth": "4.3.1" + "mailauth": "4.3.4" } } diff --git a/test/mx-connect-test.js b/test/mx-connect-test.js index afb640e..accabf2 100644 --- a/test/mx-connect-test.js +++ b/test/mx-connect-test.js @@ -2,7 +2,6 @@ 'use strict'; -const dns = require('dns'); const mxConnect = require('../lib/mx-connect'); module.exports.basic = test => { @@ -61,14 +60,10 @@ module.exports.policyFail = test => { ] }, (err, connection) => { - test.ifError(err); - test.ok(connection.socket); - - test.equal(connection.policyMatch.valid, false); - test.equal(connection.policyMatch.testing, true); - - connection.socket.once('end', () => test.done()); - connection.socket.once('data', () => connection.socket.end()); + test.ok(err); + test.ok(!connection); + test.equal(err.category, 'policy'); + test.done(); } ); }; @@ -95,7 +90,9 @@ module.exports.policySkip = test => { test.ok(!connection.policyMatch); - connection.socket.once('end', () => test.done()); + connection.socket.once('end', () => { + test.done(); + }); connection.socket.once('data', () => connection.socket.end()); } );