aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/resolve-dns.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/resolve-dns.test.ts')
-rw-r--r--test/bun.js/resolve-dns.test.ts30
1 files changed, 11 insertions, 19 deletions
diff --git a/test/bun.js/resolve-dns.test.ts b/test/bun.js/resolve-dns.test.ts
index 225a11e2a..d83e23b56 100644
--- a/test/bun.js/resolve-dns.test.ts
+++ b/test/bun.js/resolve-dns.test.ts
@@ -3,11 +3,7 @@ import { describe, expect, it, test } from "bun:test";
import { withoutAggressiveGC } from "gc";
describe("dns.lookup", () => {
- const backends = [
- process.platform === "darwin" ? "system" : undefined,
- "libc",
- "c-ares",
- ].filter(Boolean);
+ const backends = [process.platform === "darwin" ? "system" : undefined, "libc", "c-ares"].filter(Boolean);
for (let backend of backends) {
it(backend + " parallell x 10", async () => {
const promises = [];
@@ -37,18 +33,14 @@ describe("dns.lookup", () => {
console.log(first, second);
});
- it(
- backend +
- " failing domain throws an error without taking a very long time",
- async () => {
- try {
- await dns.lookup("yololololololo1234567.com", { backend });
- throw 42;
- } catch (e) {
- expect(typeof e).not.toBe("number");
- expect(e.code).toBe("DNS_ENOTFOUND");
- }
- },
- );
+ it(backend + " failing domain throws an error without taking a very long time", async () => {
+ try {
+ await dns.lookup("yololololololo1234567.com", { backend });
+ throw 42;
+ } catch (e) {
+ expect(typeof e).not.toBe("number");
+ expect(e.code).toBe("DNS_ENOTFOUND");
+ }
+ });
}
-}); \ No newline at end of file
+});