File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
packages/components/src/tree-grid/test Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ exports[`TreeGridCell uses a child render function to render children 1`] = `
55 role = " application"
66>
77 <table
8- onKeyDown = { [Function ]}
98 role = " treegrid"
109 >
1110 <tbody >
@@ -14,8 +13,7 @@ exports[`TreeGridCell uses a child render function to render children 1`] = `
1413 role = " gridcell"
1514 >
1615 <button
17- className = " my-button"
18- onFocus = { [Function ]}
16+ class = " my-button"
1917 >
2018 Click Me!
2119 </button >
Original file line number Diff line number Diff line change 11/**
22 * External dependencies
33 */
4- import TestRenderer from 'react-test-renderer ' ;
4+ import { render } from '@testing-library/react ' ;
55
66/**
77 * WordPress dependencies
@@ -21,7 +21,7 @@ const TestButton = forwardRef( ( { ...props }, ref ) => (
2121describe ( 'TreeGridCell' , ( ) => {
2222 it ( 'requires TreeGrid to be declared as a parent component somewhere in the component hierarchy' , ( ) => {
2323 expect ( ( ) =>
24- TestRenderer . create (
24+ render (
2525 < TreeGridCell >
2626 { ( props ) => (
2727 < TestButton className = "my-button" { ...props } >
@@ -35,7 +35,7 @@ describe( 'TreeGridCell', () => {
3535 } ) ;
3636
3737 it ( 'uses a child render function to render children' , ( ) => {
38- const renderer = TestRenderer . create (
38+ const { container } = render (
3939 < TreeGrid >
4040 < tr >
4141 < TreeGridCell >
@@ -49,6 +49,6 @@ describe( 'TreeGridCell', () => {
4949 </ TreeGrid >
5050 ) ;
5151
52- expect ( renderer . toJSON ( ) ) . toMatchSnapshot ( ) ;
52+ expect ( container . firstChild ) . toMatchSnapshot ( ) ;
5353 } ) ;
5454} ) ;
You can’t perform that action at this time.
0 commit comments