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

Commit 97a1349

Browse files
committed
test(stat): refactor use screen
1 parent b3f4806 commit 97a1349

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

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

44
const renderComponent = (props) => {
55
const base = {
@@ -22,8 +22,8 @@ it('should render correctly', () => {
2222
})
2323

2424
it('should render children in DOM', () => {
25-
const { getByText } = renderComponent()
26-
expect(getByText('Collected Fees')).toBeInTheDocument()
25+
renderComponent()
26+
expect(screen.getByText('Collected Fees')).toBeInTheDocument()
2727
})
2828

2929
test('"CStatArrow" should display corresponding icon for "type" prop', () => {

0 commit comments

Comments
 (0)