Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 5edf979

Browse files
committed
test(flex): refactor use screen
1 parent 470ec73 commit 5edf979

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/chakra-ui-core/src/CFlex/tests/CFlex.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import CFlex from '..'
2-
import { render } from '@/tests/test-utils'
2+
import { render, screen } from '@/tests/test-utils'
33

44
const renderComponent = (props) => {
55
const inlineAttrs = (props && props.inlineAttrs) || ''
@@ -19,11 +19,11 @@ it('should render correctly', () => {
1919

2020
it('should change styles', () => {
2121
const inlineAttrs = 'align="center" justify="center" direction="column"'
22-
const { asFragment, getByTestId } = renderComponent({ inlineAttrs })
22+
const { asFragment } = renderComponent({ inlineAttrs })
2323

2424
expect(asFragment()).toMatchSnapshot()
2525

26-
const flex = getByTestId('flex')
26+
const flex = screen.getByTestId('flex')
2727
expect(flex).toHaveStyle('display: flex')
2828
expect(flex).toHaveStyle('align-items: center')
2929
expect(flex).toHaveStyle('justify-content: center')

0 commit comments

Comments
 (0)