Skip to content

Commit db8a6f3

Browse files
committed
Cleaned up some line warnings from tests
1 parent 25509ba commit db8a6f3

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

test/customHook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-floating-promises */
21
import { useState, useCallback } from 'react'
32
import { renderHook, act } from '../src'
43

test/suspenseHook.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ describe('suspense hook tests', () => {
2222
const useFetchName = (isSuccessful = true) => {
2323
const name = fetchName(isSuccessful)
2424
if (name instanceof Promise || name instanceof Error) {
25-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
26-
throw name
25+
throw name as unknown
2726
}
2827
return name
2928
}

test/useReducer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ describe('useReducer tests', () => {
1111

1212
expect(initialState).toBe(0)
1313

14-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
1514
act(() => dispatch({ type: 'inc' }))
1615

1716
const [state] = result.current

test/useState.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@ describe('useState tests', () => {
55
test('should use setState value', () => {
66
const { result } = renderHook(() => useState('foo'))
77

8-
const [value] = result.current
8+
const [value] = result.current
99

1010
expect(value).toBe('foo')
1111
})
1212

1313
test('should update setState value using setter', () => {
1414
const { result } = renderHook(() => useState('foo'))
1515

16-
1716
const [ignoredValue, setValue] = result.current
1817

19-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
20-
act(() => setValue('bar'))
18+
act(() => setValue('bar'))
2119

2220
const [value] = result.current
2321

0 commit comments

Comments
 (0)