mirror of
https://github.com/bendtherules/react-to-markdown.git
synced 2026-08-18 22:03:20 +00:00
renderer-spec - Format file
This commit is contained in:
@@ -170,7 +170,9 @@ test('should render blockquote with mixed text', () => {
|
|||||||
expect(
|
expect(
|
||||||
(render(
|
(render(
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is <em>hello</em> <strong>world</strong></p>
|
<p>
|
||||||
|
This is <em>hello</em> <strong>world</strong>
|
||||||
|
</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
) as string).trim()
|
) as string).trim()
|
||||||
).toBe('> This is _hello_ **world**');
|
).toBe('> This is _hello_ **world**');
|
||||||
@@ -179,7 +181,9 @@ test('should render blockquote with mixed text', () => {
|
|||||||
test('should render inline code tag with text', () => {
|
test('should render inline code tag with text', () => {
|
||||||
expect(
|
expect(
|
||||||
(render(
|
(render(
|
||||||
<p>Code is <code>const a = 1;</code></p>
|
<p>
|
||||||
|
Code is <code>const a = 1;</code>
|
||||||
|
</p>
|
||||||
) as string).trim()
|
) as string).trim()
|
||||||
).toBe('Code is `const a = 1;`');
|
).toBe('Code is `const a = 1;`');
|
||||||
});
|
});
|
||||||
@@ -187,7 +191,9 @@ test('should render inline code tag with text', () => {
|
|||||||
test('should render inline code tag without text', () => {
|
test('should render inline code tag without text', () => {
|
||||||
expect(
|
expect(
|
||||||
(render(
|
(render(
|
||||||
<p>Code is <code></code></p>
|
<p>
|
||||||
|
Code is <code></code>
|
||||||
|
</p>
|
||||||
) as string).trim()
|
) as string).trim()
|
||||||
).toBe('Code is ``');
|
).toBe('Code is ``');
|
||||||
});
|
});
|
||||||
@@ -195,7 +201,9 @@ test('should render inline code tag without text', () => {
|
|||||||
test('should render pre.code tag with text', () => {
|
test('should render pre.code tag with text', () => {
|
||||||
expect(
|
expect(
|
||||||
(render(
|
(render(
|
||||||
<pre><code lang="js">const a = 1;</code></pre>
|
<pre>
|
||||||
|
<code lang="js">const a = 1;</code>
|
||||||
|
</pre>
|
||||||
) as string).trim()
|
) as string).trim()
|
||||||
).toBe('```js\nconst a = 1;\n```');
|
).toBe('```js\nconst a = 1;\n```');
|
||||||
});
|
});
|
||||||
@@ -203,7 +211,9 @@ test('should render pre.code tag with text', () => {
|
|||||||
test('should render pre.code tag without text', () => {
|
test('should render pre.code tag without text', () => {
|
||||||
expect(
|
expect(
|
||||||
(render(
|
(render(
|
||||||
<pre><code lang="js"/></pre>
|
<pre>
|
||||||
|
<code lang="js" />
|
||||||
|
</pre>
|
||||||
) as string).trim()
|
) as string).trim()
|
||||||
).toBe('```js\n\n```');
|
).toBe('```js\n\n```');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user