Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
jennspencer committed May 10, 2024
1 parent 175589e commit 88055d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/components/HTMLBlock.test.tsx
@@ -1,6 +1,6 @@
import { render, screen, cleanup } from '@testing-library/react';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { renderToStaticMarkup, renderToString } from 'react-dom/server';
import { vi } from 'vitest';

import HTMLBlock from '../../components/HTMLBlock';
Expand Down Expand Up @@ -57,7 +57,7 @@ describe('HTML Block', () => {
const md = '<HTMLBlock safeMode={true}>{`<button onload="alert(\'gotcha!\')"/>`}</HTMLBlock>';
const code = compile(md);
const Component = await run(code);
expect(renderToString(<Component />)).toMatchInlineSnapshot(
expect(renderToStaticMarkup(<Component />)).toMatchInlineSnapshot(
'"<pre class="html-unsafe"><code>&lt;button onload=&quot;alert(&#x27;gotcha!&#x27;)&quot;/&gt;</code></pre>"',
);
});
Expand Down

0 comments on commit 88055d7

Please sign in to comment.