We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9125713 commit 38422e3Copy full SHA for 38422e3
__tests__/components/CodePreTag.test.jsx
@@ -6,14 +6,15 @@ import CodePreTag from '../../src/components/CodePreTag';
6
7
describe('<CodePreTag /> component', () => {
8
it('renders children properly', () => {
9
+ const codeToRender = `
10
+ function foo() {
11
+ return 'bar';
12
+ }
13
+ `;
14
const tree = renderer
15
.create(
16
<CodePreTag>
- <code>
- {`function foo() {
- return 'bar';
- }`}
- </code>
17
+ <code>{codeToRender}</code>
18
</CodePreTag>
19
)
20
.toJSON();
__tests__/components/__snapshots__/CodePreTag.test.jsx.snap
@@ -3,9 +3,11 @@
3
exports[`<CodePreTag /> component renders children properly 1`] = `
4
<pre>
5
<code>
- function foo() {
- }
+
</code>
</pre>
`;
0 commit comments