diff --git a/.gitignore b/.gitignore index 990cf8f24..36f4d7564 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ example/demo.js* example/demo.css dist + +.env diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-callout-tests-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-callout-tests-without-surprises-1-snap.png index 0139e3e07..8e435f209 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-callout-tests-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-callout-tests-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-block-tests-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-block-tests-without-surprises-1-snap.png index e03c06a7d..322492b99 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-block-tests-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-block-tests-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-blocks-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-blocks-without-surprises-1-snap.png index 4c87b2a32..188030ae2 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-blocks-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-code-blocks-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-embeds-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-embeds-without-surprises-1-snap.png index 45b929a29..f7bfb6f8b 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-embeds-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-embeds-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-html-tests-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-html-tests-without-surprises-1-snap.png index 458ebc6d9..093ae091f 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-html-tests-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-html-tests-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-images-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-images-without-surprises-1-snap.png index 0a1a1b2a3..2f04bff65 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-images-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-images-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-mdx-components-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-mdx-components-without-surprises-1-snap.png index 27bab1b48..50c28e630 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-mdx-components-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-mdx-components-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-tables-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-tables-without-surprises-1-snap.png index dbbdda013..691f2b248 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-tables-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-tables-without-surprises-1-snap.png differ diff --git a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-vars-test-without-surprises-1-snap.png b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-vars-test-without-surprises-1-snap.png index 1cfdbb7d9..747a49618 100644 Binary files a/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-vars-test-without-surprises-1-snap.png and b/__tests__/browser/__image_snapshots__/markdown-test-js-visual-regression-tests-rdmd-syntax-renders-vars-test-without-surprises-1-snap.png differ diff --git a/__tests__/components/CodeTabs.test.tsx b/__tests__/components/CodeTabs.test.tsx index 5e65ffdcb..667d3d3dd 100644 --- a/__tests__/components/CodeTabs.test.tsx +++ b/__tests__/components/CodeTabs.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { compile, run } from '../../index'; +import { execute } from '../helpers'; describe('CodeTabs', () => { it.skip('render _all_ its children', async () => { @@ -12,7 +12,7 @@ assert('theme', 'dark'); assert('theme', 'light'); \`\`\` `; - const Component = await run(compile(md)); + const Component = await execute(md); const { container } = render(); expect(container).toHaveTextContent(`assert('theme', 'dark')`); diff --git a/__tests__/components/Glossary.test.tsx b/__tests__/components/Glossary.test.tsx index 1ecac9bc9..a07b526b6 100644 --- a/__tests__/components/Glossary.test.tsx +++ b/__tests__/components/Glossary.test.tsx @@ -1,12 +1,12 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { run, compile } from '../../index'; +import { execute } from '../helpers'; describe('Glossary', () => { it('renders a glossary item', async () => { const md = `parliament`; - const Content = await run(compile(md)); + const Content = await execute(md); render(); expect(screen.getByText('parliament')).toBeVisible(); diff --git a/__tests__/components/HTMLBlock.test.tsx b/__tests__/components/HTMLBlock.test.tsx index 15fe6651c..49b02600a 100644 --- a/__tests__/components/HTMLBlock.test.tsx +++ b/__tests__/components/HTMLBlock.test.tsx @@ -4,7 +4,7 @@ import { renderToStaticMarkup, renderToString } from 'react-dom/server'; import { vi } from 'vitest'; import HTMLBlock from '../../components/HTMLBlock'; -import { compile, run } from '../../index'; +import { execute } from '../helpers'; describe('HTML Block', () => { beforeEach(() => { @@ -55,8 +55,7 @@ describe('HTML Block', () => { it('renders the html in a `
` tag if safeMode={true}', async () => {
     const md = '{`