File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "editor.formatOnSave" : false
3
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import renderer from 'react-test-renderer' ;
3
+ import 'jest-styled-components' ;
4
+
5
+ import CodePreTag from '../../src/components/CodePreTag' ;
6
+
7
+ describe ( '<CodePreTag /> component' , ( ) => {
8
+ it ( 'renders children properly' , ( ) => {
9
+ const tree = renderer
10
+ . create (
11
+ < CodePreTag >
12
+ < code >
13
+ { `function foo() {
14
+ return 'bar';
15
+ }` }
16
+ </ code >
17
+ </ CodePreTag >
18
+ )
19
+ . toJSON ( ) ;
20
+
21
+ expect ( tree ) . toMatchSnapshot ( ) ;
22
+ } ) ;
23
+ } ) ;
Original file line number Diff line number Diff line change
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports [` <CodePreTag /> component renders children properly 1` ] = `
4
+ <pre >
5
+ <code >
6
+ function foo() {
7
+ return ' bar' ;
8
+ }
9
+ </code >
10
+ </pre >
11
+ ` ;
You can’t perform that action at this time.
0 commit comments