Skip to content

Commit d2c719c

Browse files
committed
test: update useSize spec
1 parent 721b980 commit d2c719c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/useSize/__test__/index.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('useSize', () => {
2323
expect(hook.result()).toEqual({ height: 0, width: 0 })
2424
})
2525

26-
it('should work when target is a `MutableRefObject`', async () => {
26+
it('should work when target is a `ref`', async () => {
2727
const mockRaf = vi
2828
.spyOn(window, 'requestAnimationFrame')
2929
.mockImplementation((cb: FrameRequestCallback) => {
@@ -51,15 +51,15 @@ describe('useSize', () => {
5151

5252
render(() => <Setup />)
5353
expect(await screen.findByText(/^width/)).toHaveTextContent(
54-
'width: undefined',
54+
'width:undefined',
5555
)
5656
expect(await screen.findByText(/^height/)).toHaveTextContent(
57-
'height: undefined',
57+
'height:undefined',
5858
)
5959

6060
callback([{ target: { clientWidth: 10, clientHeight: 10 } }])
61-
expect(await screen.findByText(/^width/)).toHaveTextContent('width: 10')
62-
expect(await screen.findByText(/^height/)).toHaveTextContent('height: 10')
61+
expect(await screen.findByText(/^width/)).toHaveTextContent('width:10')
62+
expect(await screen.findByText(/^height/)).toHaveTextContent('height:10')
6363
mockRaf.mockRestore()
6464
})
6565

0 commit comments

Comments
 (0)