diff options
author | 2023-05-30 16:18:20 -0400 | |
---|---|---|
committer | 2023-05-30 16:18:20 -0400 | |
commit | bef3a75dbc48d584daff9f7f3d5a8937b0356170 (patch) | |
tree | 536921af91ee7864192369e39be6f99eed134741 /packages/integrations/markdoc/test/entry-prop.test.js | |
parent | c7897f20a9d6e04f9cdee9a0f7e48e59adf1e59a (diff) | |
download | astro-bef3a75dbc48d584daff9f7f3d5a8937b0356170.tar.gz astro-bef3a75dbc48d584daff9f7f3d5a8937b0356170.tar.zst astro-bef3a75dbc48d584daff9f7f3d5a8937b0356170.zip |
Markdoc - remove `$entry` variable (#7244)
* refactor: remove entry prop from `getRenderModule()`
* refactor: remove `$entry` from markdoc
* test: update entry-prop -> variables test
* refactor: unify `getEntryConfigByExt`
* chore: clean up shared content / data get logic
* docs: update `$entry` recommendation
* chore: rename entry-prop -> variables
* chore: changeset
* chore: missed a spot
Diffstat (limited to 'packages/integrations/markdoc/test/entry-prop.test.js')
-rw-r--r-- | packages/integrations/markdoc/test/entry-prop.test.js | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/packages/integrations/markdoc/test/entry-prop.test.js b/packages/integrations/markdoc/test/entry-prop.test.js deleted file mode 100644 index b47ccf739..000000000 --- a/packages/integrations/markdoc/test/entry-prop.test.js +++ /dev/null @@ -1,58 +0,0 @@ -import { parseHTML } from 'linkedom'; -import { expect } from 'chai'; -import { loadFixture } from '../../../astro/test/test-utils.js'; -import markdoc from '../dist/index.js'; - -const root = new URL('./fixtures/entry-prop/', import.meta.url); - -describe('Markdoc - Entry prop', () => { - let baseFixture; - - before(async () => { - baseFixture = await loadFixture({ - root, - integrations: [markdoc()], - }); - }); - - describe('dev', () => { - let devServer; - - before(async () => { - devServer = await baseFixture.startDevServer(); - }); - - after(async () => { - await devServer.stop(); - }); - - it('has expected entry properties', async () => { - const res = await baseFixture.fetch('/'); - const html = await res.text(); - const { document } = parseHTML(html); - expect(document.querySelector('h1')?.textContent).to.equal('Processed by schema: Test entry'); - expect(document.getElementById('id')?.textContent?.trim()).to.equal('id: entry.mdoc'); - expect(document.getElementById('slug')?.textContent?.trim()).to.equal('slug: entry'); - expect(document.getElementById('collection')?.textContent?.trim()).to.equal( - 'collection: blog' - ); - }); - }); - - describe('build', () => { - before(async () => { - await baseFixture.build(); - }); - - it('has expected entry properties', async () => { - const html = await baseFixture.readFile('/index.html'); - const { document } = parseHTML(html); - expect(document.querySelector('h1')?.textContent).to.equal('Processed by schema: Test entry'); - expect(document.getElementById('id')?.textContent?.trim()).to.equal('id: entry.mdoc'); - expect(document.getElementById('slug')?.textContent?.trim()).to.equal('slug: entry'); - expect(document.getElementById('collection')?.textContent?.trim()).to.equal( - 'collection: blog' - ); - }); - }); -}); |