diff options
Diffstat (limited to 'cli/tests/testdata/run/resolve_dns.ts')
-rw-r--r-- | cli/tests/testdata/run/resolve_dns.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/resolve_dns.ts b/cli/tests/testdata/run/resolve_dns.ts index ae6ed70a4..a2d0fd046 100644 --- a/cli/tests/testdata/run/resolve_dns.ts +++ b/cli/tests/testdata/run/resolve_dns.ts @@ -69,3 +69,25 @@ try { } catch (e) { console.log(e.message); } + +try { + const ac = new AbortController(); + queueMicrotask(() => ac.abort()); + await Deno.resolveDns("www.example.com", "A", { + ...nameServer, + signal: ac.signal, + }); +} catch (e) { + console.log(e.name); +} + +try { + const ac = new AbortController(); + ac.abort(); + await Deno.resolveDns("www.example.com", "A", { + ...nameServer, + signal: ac.signal, + }); +} catch (e) { + console.log(e.name); +} |