aboutsummaryrefslogtreecommitdiff
path: root/deno/mail-relay/mail.test.ts
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-06-10 19:07:50 +0800
committerYuqian Yang <crupest@crupest.life>2025-06-10 19:07:50 +0800
commite759291d4a1e6a162265c737608c26aea43537d0 (patch)
treeebe00a3c234c3166ccd75d157f4d4aae6d0d4032 /deno/mail-relay/mail.test.ts
parent7334e4fcf78544e07aee5046757885e721dcfd11 (diff)
downloadcrupest-e759291d4a1e6a162265c737608c26aea43537d0.tar.gz
crupest-e759291d4a1e6a162265c737608c26aea43537d0.tar.bz2
crupest-e759291d4a1e6a162265c737608c26aea43537d0.zip
chore(deno): prettier all.
Diffstat (limited to 'deno/mail-relay/mail.test.ts')
-rw-r--r--deno/mail-relay/mail.test.ts26
1 files changed, 12 insertions, 14 deletions
diff --git a/deno/mail-relay/mail.test.ts b/deno/mail-relay/mail.test.ts
index 6f3cd13..09cf8eb 100644
--- a/deno/mail-relay/mail.test.ts
+++ b/deno/mail-relay/mail.test.ts
@@ -67,33 +67,31 @@ describe("Mail", () => {
});
it("simple parse date", () => {
- expect(new Mail(mockMailStr).startSimpleParse().sections().headers().date())
- .toEqual(new Date(mockDate));
+ expect(
+ new Mail(mockMailStr).startSimpleParse().sections().headers().date(),
+ ).toEqual(new Date(mockDate));
});
it("simple parse headers", () => {
expect(
new Mail(mockMailStr).startSimpleParse().sections().headers().fields,
- ).toEqual(mockHeaders.map(
- (h) => [h[0], " " + h[1].replaceAll("\n", "")],
- ));
+ ).toEqual(mockHeaders.map((h) => [h[0], " " + h[1].replaceAll("\n", "")]));
});
it("parse recipients", () => {
const mail = new Mail(mockMailStr);
- expect([...mail.startSimpleParse().sections().headers().recipients()])
- .toEqual([
- ...mockToAddresses,
- mockCcAddress,
- ]);
+ expect([
+ ...mail.startSimpleParse().sections().headers().recipients(),
+ ]).toEqual([...mockToAddresses, mockCcAddress]);
expect([
...mail.startSimpleParse().sections().headers().recipients({
domain: "example.com",
}),
- ]).toEqual([
- ...mockToAddresses,
- mockCcAddress,
- ].filter((a) => a.endsWith("example.com")));
+ ]).toEqual(
+ [...mockToAddresses, mockCcAddress].filter((a) =>
+ a.endsWith("example.com"),
+ ),
+ );
});
it("find all addresses", () => {