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

Commit 92d5db7

Browse files
committed
test(form-control): refactor use screen
1 parent 2403331 commit 92d5db7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CFormControl, CInput, CFormLabel } 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) || ''
@@ -22,7 +22,7 @@ it('should render correctly', () => {
2222
})
2323

2424
it('should provide formcontrol state via scoped slot', () => {
25-
const { getByTestId } = renderComponent({
25+
renderComponent({
2626
template: `
2727
<CFormControl isRequired isReadOnly #default="props">
2828
<pre data-testid="pre">
@@ -31,7 +31,7 @@ it('should provide formcontrol state via scoped slot', () => {
3131
</CFormControl>`
3232
})
3333

34-
const pre = getByTestId('pre')
34+
const pre = screen.getByTestId('pre')
3535
expect(JSON.parse(pre.textContent, null, 2)).toEqual({
3636
isInvalid: false,
3737
isRequired: true,

0 commit comments

Comments
 (0)