test: pass missing prop in test (#2876)
This commit is contained in:
parent
665afed3c2
commit
4833f33728
@ -37,7 +37,9 @@ Text with **bold** & _em_ elements
|
||||
![](https://pbs.twimg.com/profile_images/678903331176214528/TQTdqGwD.jpg)
|
||||
`;
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -47,7 +49,9 @@ Text with **bold** & _em_ elements
|
||||
it(`should render Heading ${heading + 1}`, () => {
|
||||
const value = padStart(' Title', heading + 7, '#');
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
}
|
||||
@ -67,7 +71,9 @@ Text with **bold** & _em_ elements
|
||||
1. ol item 3
|
||||
`;
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -82,7 +88,9 @@ I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]
|
||||
[3]: http://search.msn.com/ "MSN Search"
|
||||
`;
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -91,14 +99,18 @@ I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]
|
||||
it('should render code', () => {
|
||||
const value = 'Use the `printf()` function.';
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render code 2', () => {
|
||||
const value = '``There is a literal backtick (`) here.``';
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -121,7 +133,9 @@ I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]
|
||||
<h1 style="display: block; border: 10px solid #f00; width: 100%">Test</h1>
|
||||
`;
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@ -131,7 +145,9 @@ I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]
|
||||
it('should render HTML', () => {
|
||||
const value = '<p>Paragraph with <em>inline</em> element</p>';
|
||||
expect(
|
||||
renderer.create(<MarkdownPreview value={markdownToHtml(value)} />).toJSON(),
|
||||
renderer
|
||||
.create(<MarkdownPreview value={markdownToHtml(value)} getAsset={jest.fn()} />)
|
||||
.toJSON(),
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user