Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 20, 2024
1 parent c9a51e4 commit 65ce3e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/data-state.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import type { AsyncDataState, DataState } from './data-state'
describe('DataState', () => {
const asyncState = reactive<AsyncDataState<number, Error>>({} as any)
const dataState = reactive<DataState<number, Error>>({} as any)
it.each([asyncState, dataState] as const)('narrowing', (state) => {
const state: typeof asyncState | typeof dataState = dataState
it('narrowing', () => {
if (state.status === 'pending') {
expectTypeOf(state.data).toEqualTypeOf<undefined>()
expectTypeOf(state.error).toEqualTypeOf<null>()
Expand Down

0 comments on commit 65ce3e9

Please sign in to comment.