Skip to content

Commit d7d74a2

Browse files
committed
chore: new unit test
1 parent 7dd6fc2 commit d7d74a2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/plugins/internalLinks.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,36 @@ test("does not interfere with mailto links", async () => {
374374
});
375375
expect(results.trim()).toBe(`[mailme](mailto:foo@example.com)`);
376376
});
377+
378+
test("does not interfere with https links", async () => {
379+
const results = await getMarkdown({
380+
type: "paragraph",
381+
paragraph: {
382+
rich_text: [
383+
{
384+
type: "text",
385+
text: {
386+
content: "google",
387+
link: { url: `https://www.google.com` },
388+
},
389+
annotations: {
390+
bold: false,
391+
italic: false,
392+
strikethrough: false,
393+
underline: false,
394+
code: false,
395+
color: "default",
396+
},
397+
plain_text: "google",
398+
href: `https://www.google.com`,
399+
},
400+
],
401+
color: "default",
402+
},
403+
});
404+
expect(results.trim()).toBe(`[google](https://www.google.com)`);
405+
});
406+
377407
test("links to other notion pages that are not in this site give PROBLEM LINK", async () => {
378408
const results = await getMarkdown({
379409
type: "paragraph",

0 commit comments

Comments
 (0)