This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/chakra-ui-core/src/CText/tests Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import CText from '..'
2
- import { render } from '@/tests/test-utils'
2
+ import { render , screen } from '@/tests/test-utils'
3
3
4
4
const renderComponent = ( props ) => {
5
5
const inlineAttrs = ( props && props . inlineAttrs ) || ''
@@ -19,9 +19,9 @@ it('should render correctly', () => {
19
19
20
20
it ( 'should change the style' , ( ) => {
21
21
const inlineAttrs = 'd="flex"'
22
- const { asFragment, getByTestId } = renderComponent ( { inlineAttrs } )
22
+ const { asFragment } = renderComponent ( { inlineAttrs } )
23
23
24
- const text = getByTestId ( 'text' )
24
+ const text = screen . getByTestId ( 'text' )
25
25
26
26
expect ( asFragment ( ) ) . toMatchSnapshot ( )
27
27
expect ( text ) . toHaveStyle ( 'display: flex' )
@@ -44,8 +44,8 @@ it.each`
44
44
'should display text type as $as' ,
45
45
( { as } ) => {
46
46
const inlineAttrs = `as=${ as } `
47
- const { getByTestId } = renderComponent ( { inlineAttrs } )
48
- const text = getByTestId ( 'text' )
47
+ renderComponent ( { inlineAttrs } )
48
+ const text = screen . getByTestId ( 'text' )
49
49
expect ( text . tagName . toLowerCase ( ) ) . toEqual ( as )
50
50
}
51
51
)
You can’t perform that action at this time.
0 commit comments