Merge pull request #113 from LINUXexpert-org/fixture-example-address
Use an example address, and the right name, in the test fixtures
This commit is contained in:
@@ -77,7 +77,7 @@ describe("what it refuses to acknowledge", () => {
|
||||
});
|
||||
|
||||
const OPTS = {
|
||||
from: { name: "John Ellis", email: "[email protected]" } as EmailAddress,
|
||||
from: { name: "John Coffey", email: "[email protected]" } as EmailAddress,
|
||||
to: { name: null, email: "[email protected]" } as EmailAddress,
|
||||
finalRecipient: "[email protected]",
|
||||
reportingUa: "mail.example.org; ihasmail 2.0",
|
||||
|
||||
@@ -3,14 +3,14 @@ import { buildMarkerSignature, byteLength, compactHtml, markerOf, signatureTooLo
|
||||
|
||||
describe("signature compaction", () => {
|
||||
it("strips office cruft and non-essential styles but keeps colours and links", () => {
|
||||
const src = `<!--[if gte mso 9]><xml>x</xml><![endif]--><div class="WordSection1" style="mso-margin-top-alt:auto;line-height:115%;font-family:'Calibri',sans-serif;color:windowtext"><p class="MsoNormal" style="margin:0cm;font-size:11pt"><span lang="EN-US" style="font-size:12pt;color:#1F4E79;mso-fareast-language:EN-US"><b>John Ellis</b></span><o:p></o:p></p><p><span></span></p><a href="https://linuxexpert.org" target="_blank" data-x="1">linuxexpert.org</a><img src="https://x/y.png" width="100" style="mso-foo:bar"></div>`;
|
||||
const src = `<!--[if gte mso 9]><xml>x</xml><![endif]--><div class="WordSection1" style="mso-margin-top-alt:auto;line-height:115%;font-family:'Calibri',sans-serif;color:windowtext"><p class="MsoNormal" style="margin:0cm;font-size:11pt"><span lang="EN-US" style="font-size:12pt;color:#1F4E79;mso-fareast-language:EN-US"><b>John Coffey</b></span><o:p></o:p></p><p><span></span></p><a href="https://linuxexpert.org" target="_blank" data-x="1">linuxexpert.org</a><img src="https://x/y.png" width="100" style="mso-foo:bar"></div>`;
|
||||
const out = compactHtml(src);
|
||||
expect(out).not.toContain("mso-");
|
||||
expect(out).not.toContain("class=");
|
||||
expect(out).not.toContain("<xml");
|
||||
expect(out).not.toContain("o:p");
|
||||
expect(out).toContain("color:#1F4E79");
|
||||
expect(out).toContain("<b>John Ellis</b>");
|
||||
expect(out).toContain("<b>John Coffey</b>");
|
||||
expect(out).toContain('href="https://linuxexpert.org"');
|
||||
expect(out).toContain('width="100"');
|
||||
expect(out.length).toBeLessThan(src.length / 2);
|
||||
|
||||
@@ -41,7 +41,7 @@ describe("makeParticipant", () => {
|
||||
expect(guest.expectReply).toBe(true);
|
||||
});
|
||||
it("marks the organizer as owner and keeps a status already given", () => {
|
||||
const me = makeParticipant("john@linuxexperts.net", "John Coffey", "owner");
|
||||
const me = makeParticipant("john@example.org", "John Coffey", "owner");
|
||||
expect(me.roles).toEqual({ owner: true, attendee: true });
|
||||
expect(me.participationStatus).toBe("accepted");
|
||||
expect(me.expectReply).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user