From 4484035d750ff2c74a09b8cf5fa6c7daf830434b Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 21 Feb 2023 07:51:18 +1300 Subject: [PATCH] Add Markdown test --- tests/markdown/basic.test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/markdown/basic.test.js b/tests/markdown/basic.test.js index 174e43d7e..459bb22c4 100644 --- a/tests/markdown/basic.test.js +++ b/tests/markdown/basic.test.js @@ -13,3 +13,9 @@ test('Processes the markdown within an HTML block if its just a class wrapper', const rendered = Markdown.render(source); expect(rendered).toBe('

Bold text

\n
'); }); + +test('Check markdown is using the custom renderer; specifically that it adds target=_self attribute to internal links in HTML blocks', function() { + const source = '
[Has _self Attribute?](#p1)
'; + const rendered = Markdown.render(source); + expect(rendered).toBe('

Has _self Attribute?

\n
'); +});