Skip to content

Commit be7877c

Browse files
committed
Migrate remaining type tests to vitest
1 parent cb3779d commit be7877c

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

type-tests/argsMemoize.test-d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -992,19 +992,19 @@ describe('type tests', () => {
992992
}[]
993993
>()
994994

995-
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchTypeOf<
995+
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchObjectType<
996996
[RootState]
997997
>()
998998

999-
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchTypeOf<
999+
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchObjectType<
10001000
[number]
10011001
>()
10021002

1003-
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchTypeOf<
1003+
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchObjectType<
10041004
[RootState, string]
10051005
>()
10061006

1007-
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchTypeOf<
1007+
expectTypeOf(selectorDefaultParametric).parameters.not.toMatchObjectType<
10081008
[RootState, number, number]
10091009
>()
10101010

type-tests/createSelector.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('type tests', () => {
7373

7474
const selector = createSelector((state: State) => state.bar, subSelector)
7575

76-
expectTypeOf(selector).parameter(0).not.toMatchTypeOf({ foo: '' })
76+
expectTypeOf(selector).parameter(0).not.toMatchObjectType<{ foo: '' }>()
7777

7878
expectTypeOf(selector({ bar: { foo: '' } })).not.toBeNumber()
7979

@@ -112,7 +112,7 @@ describe('type tests', () => {
112112

113113
expectTypeOf(connected)
114114
.parameter(0)
115-
.not.toMatchTypeOf({ bar: 42, baz: 123 })
115+
.not.toMatchObjectType<{ bar: 42; baz: 123 }>()
116116
})
117117

118118
test('invalid type in combiner', () => {

type-tests/createSelectorCreator.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import lodashMemoize from 'lodash/memoize'
33
import memoizeOne from 'memoize-one'
44
import microMemoize from 'micro-memoize'
55
import {
6+
unstable_autotrackMemoize as autotrackMemoize,
67
createSelectorCreator,
78
lruMemoize,
8-
unstable_autotrackMemoize as autotrackMemoize,
99
weakMapMemoize
1010
} from 'reselect'
1111
import { describe, test } from 'vitest'
@@ -73,7 +73,7 @@ describe('type tests', () => {
7373

7474
expectTypeOf(selector({ foo: 'fizz' })).toBeString()
7575

76-
expectTypeOf(selector).parameter(1).not.toMatchTypeOf({ bar: 42 })
76+
expectTypeOf(selector).parameter(1).not.toMatchObjectType<{ bar: 42 }>()
7777

7878
// clearCache should exist because of lruMemoize
7979
expectTypeOf(selector.clearCache).toBeFunction()

type-tests/createStructuredSelector.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('type tests', () => {
194194

195195
expectTypeOf(structuredSelector.clearCache).parameters.toEqualTypeOf<[]>()
196196

197-
expectTypeOf(structuredSelector.dependencies).items.toMatchTypeOf<
197+
expectTypeOf(structuredSelector.dependencies).items.toExtend<
198198
Selector<RootState>
199199
>()
200200

type-tests/createStructuredSelector.withTypes.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ describe('type tests', () => {
218218
[]
219219
>()
220220

221-
expectTypeOf(structuredAppSelector.dependencies).items.toMatchTypeOf<
221+
expectTypeOf(structuredAppSelector.dependencies).items.toExtend<
222222
Selector<RootState>
223223
>()
224224

0 commit comments

Comments
 (0)