File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
polaris-react/src/components/InlineCode/tests Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { mountWithApp } from 'tests/utilities' ;
3+
4+ import { InlineCode } from '../InlineCode' ;
5+
6+ describe ( '<Text />' , ( ) => {
7+ const text = 'Hello world' ;
8+
9+ it ( 'renders its children' , ( ) => {
10+ const inlineCode = mountWithApp ( < InlineCode > { text } </ InlineCode > ) ;
11+ expect ( inlineCode ) . toContainReactText ( text ) ;
12+ } ) ;
13+
14+ it ( 'renders its children inside a code tag' , ( ) => {
15+ const inlineCode = mountWithApp ( < InlineCode > { text } </ InlineCode > ) ;
16+ expect ( inlineCode ) . toContainReactComponent ( 'code' ) ;
17+ } ) ;
18+
19+ it ( 'renders its children with code block styling' , ( ) => {
20+ const inlineCode = mountWithApp ( < InlineCode > { text } </ InlineCode > ) ;
21+ expect ( inlineCode ) . toContainReactComponent ( 'code' , {
22+ className : expect . stringContaining ( 'Code' ) ,
23+ } ) ;
24+ } ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments