summaryrefslogtreecommitdiff
path: root/test/parallel/test-dns-lookup.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-dns-lookup.js')
-rw-r--r--test/parallel/test-dns-lookup.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/parallel/test-dns-lookup.js b/test/parallel/test-dns-lookup.js
index 3da4e9f58d..951e7e17a9 100644
--- a/test/parallel/test-dns-lookup.js
+++ b/test/parallel/test-dns-lookup.js
@@ -21,21 +21,19 @@ cares.getaddrinfo = () => internalBinding('uv').UV_ENOENT;
common.expectsError(() => dnsPromises.lookup(1, {}), err);
}
+// This also verifies different expectWarning notations.
common.expectWarning({
// For 'internal/test/binding' module.
'internal/test/binding': [
'These APIs are for internal testing only. Do not use them.'
],
// For dns.promises.
- 'ExperimentalWarning': [
- 'The dns.promises API is experimental'
- ],
+ 'ExperimentalWarning': 'The dns.promises API is experimental',
// For calling `dns.lookup` with falsy `hostname`.
- 'DeprecationWarning': [
- 'The provided hostname "false" is not a valid ' +
- 'hostname, and is supported in the dns module solely for compatibility.',
- 'DEP0118',
- ],
+ 'DeprecationWarning': {
+ DEP0118: 'The provided hostname "false" is not a valid ' +
+ 'hostname, and is supported in the dns module solely for compatibility.'
+ }
});
common.expectsError(() => {