File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/material-ui/src/CssBaseline Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22import { expect } from 'chai' ;
3- import { createMount } from 'test/utils' ;
3+ import { createClientRender } from 'test/utils' ;
44import CssBaseline from './CssBaseline' ;
55
66describe ( '<CssBaseline />' , ( ) => {
77 // StrictModeViolation: makeStyles will retain the styles in the head in strict mode
88 // which becomes an issue for global styles
9- const mount = createMount ( { strict : false } ) ;
9+ const render = createClientRender ( { strict : false } ) ;
1010
1111 it ( 'renders its children' , ( ) => {
12- const wrapper = mount (
12+ const { container } = render (
1313 < CssBaseline >
1414 < div id = "child" />
1515 </ CssBaseline > ,
1616 ) ;
17- expect ( wrapper . find ( '#child' ) . type ( ) ) . to . equal ( 'div' ) ;
17+
18+ const child = container . querySelector ( '#child' ) ;
19+
20+ expect ( child . tagName ) . to . equal ( 'DIV' ) ;
1821 } ) ;
1922} ) ;
You can’t perform that action at this time.
0 commit comments