aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/test/render.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/markdoc/test/render.test.js')
-rw-r--r--packages/integrations/markdoc/test/render.test.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/integrations/markdoc/test/render.test.js b/packages/integrations/markdoc/test/render.test.js
index d439adcd2..4c6d1b415 100644
--- a/packages/integrations/markdoc/test/render.test.js
+++ b/packages/integrations/markdoc/test/render.test.js
@@ -117,6 +117,15 @@ describe('Markdoc - render', () => {
renderWithRootFolderContainingSpace(html);
});
+
+ it('renders content - with typographer option', async () => {
+ const fixture = await getFixture('render-typographer');
+ await fixture.build()
+
+ const html = await fixture.readFile('/index.html');
+
+ renderTypographerChecks(html);
+ });
});
});
@@ -173,3 +182,16 @@ function renderWithRootFolderContainingSpace(html) {
const p = document.querySelector('p');
assert.equal(p.textContent, 'This is a simple Markdoc post with root folder containing a space.');
}
+
+/**
+ * @param {string} html
+ */
+function renderTypographerChecks(html) {
+ const { document } = parseHTML(html);
+
+ const h2 = document.querySelector('h2');
+ assert.equal(h2.textContent, 'Typographer’s post');
+
+ const p = document.querySelector('p');
+ assert.equal(p.textContent, 'This is a post to test the “typographer” option.');
+}