format: run prettier tree-wide

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2026-02-15 11:53:39 +00:00
parent 7075f74764
commit 5e2bff8397
157 changed files with 1741 additions and 1621 deletions

View File

@@ -1,19 +1,20 @@
async function testWithUserAgent(userAgent) {
const statusCode =
await fetch("https://relayd.local.cetacean.club:3004/reqmeta", {
const statusCode = await fetch(
"https://relayd.local.cetacean.club:3004/reqmeta",
{
headers: {
"User-Agent": userAgent,
}
})
.then(resp => resp.status);
},
},
).then((resp) => resp.status);
return statusCode;
}
const codes = {
allow: await testWithUserAgent("ALLOW"),
challenge: await testWithUserAgent("CHALLENGE"),
deny: await testWithUserAgent("DENY")
}
deny: await testWithUserAgent("DENY"),
};
const expected = {
allow: 200,
@@ -26,5 +27,7 @@ console.log("CHALLENGE:", codes.challenge);
console.log("DENY: ", codes.deny);
if (JSON.stringify(codes) !== JSON.stringify(expected)) {
throw new Error(`wanted ${JSON.stringify(expected)}, got: ${JSON.stringify(codes)}`);
}
throw new Error(
`wanted ${JSON.stringify(expected)}, got: ${JSON.stringify(codes)}`,
);
}