summaryrefslogtreecommitdiff
path: root/test/internet
diff options
context:
space:
mode:
Diffstat (limited to 'test/internet')
-rw-r--r--test/internet/test-dns-promises-resolve.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/internet/test-dns-promises-resolve.js b/test/internet/test-dns-promises-resolve.js
index b9e7fa4230..a482cba60a 100644
--- a/test/internet/test-dns-promises-resolve.js
+++ b/test/internet/test-dns-promises-resolve.js
@@ -1,5 +1,5 @@
'use strict';
-const common = require('../common');
+require('../common');
const assert = require('assert');
const dnsPromises = require('dns').promises;
@@ -7,11 +7,11 @@ const dnsPromises = require('dns').promises;
// Error when rrtype is invalid.
{
const rrtype = 'DUMMY';
- common.expectsError(
+ assert.throws(
() => dnsPromises.resolve('example.org', rrtype),
{
code: 'ERR_INVALID_OPT_VALUE',
- type: TypeError,
+ name: 'TypeError',
message: `The value "${rrtype}" is invalid for option "rrtype"`
}
);
@@ -20,11 +20,11 @@ const dnsPromises = require('dns').promises;
// Error when rrtype is a number.
{
const rrtype = 0;
- common.expectsError(
+ assert.throws(
() => dnsPromises.resolve('example.org', rrtype),
{
code: 'ERR_INVALID_ARG_TYPE',
- type: TypeError,
+ name: 'TypeError',
message: 'The "rrtype" argument must be of type string. ' +
`Received type ${typeof rrtype} (${rrtype})`
}