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.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/integrations/markdoc/test/render.test.js b/packages/integrations/markdoc/test/render.test.js
index 3ac9c3ac4..f1760a8e6 100644
--- a/packages/integrations/markdoc/test/render.test.js
+++ b/packages/integrations/markdoc/test/render.test.js
@@ -69,6 +69,18 @@ describe('Markdoc - render', () => {
await server.stop();
});
+
+ it('renders content - with root folder containing space', async () => {
+ const fixture = await getFixture('render with-space');
+ const server = await fixture.startDevServer();
+
+ const res = await fixture.fetch('/');
+ const html = await res.text();
+
+ renderWithRootFolderContainingSpace(html);
+
+ await server.stop();
+ });
});
describe('build', () => {
@@ -116,6 +128,15 @@ describe('Markdoc - render', () => {
renderNullChecks(html);
});
+
+ it('renders content - with root folder containing space', async () => {
+ const fixture = await getFixture('render with-space');
+ await fixture.build();
+
+ const html = await fixture.readFile('/index.html');
+
+ renderWithRootFolderContainingSpace(html);
+ });
});
});
@@ -189,3 +210,14 @@ function renderSimpleChecks(html) {
const p = document.querySelector('p');
expect(p.textContent).to.equal('This is a simple Markdoc post.');
}
+
+/** @param {string} html */
+function renderWithRootFolderContainingSpace(html) {
+ const { document } = parseHTML(html);
+ const h2 = document.querySelector('h2');
+ expect(h2.textContent).to.equal('Simple post with root folder containing a space');
+ const p = document.querySelector('p');
+ expect(p.textContent).to.equal(
+ 'This is a simple Markdoc post with root folder containing a space.'
+ );
+}