File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/toolkit/src/query/tests Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,17 @@ import type { RetryOptions } from '@internal/query/retry'
22
33describe ( 'type tests' , ( ) => {
44 test ( 'RetryOptions only accepts one of maxRetries or retryCondition' , ( ) => {
5+ // Should not complain if only `maxRetries` exists
6+ expectTypeOf ( { maxRetries : 5 } ) . toMatchTypeOf < RetryOptions > ( )
7+
8+ // Should not complain if only `retryCondition` exists
9+ expectTypeOf ( { retryCondition : ( ) => false } ) . toMatchTypeOf < RetryOptions > ( )
10+
511 // Should complain if both `maxRetries` and `retryCondition` exist at once
6- expectTypeOf < RetryOptions > ( ) . not . toMatchTypeOf ( {
12+ expectTypeOf ( {
713 maxRetries : 5 ,
814 retryCondition : ( ) => false ,
9- } )
15+ } ) . not . toMatchTypeOf < RetryOptions > ( )
1016 } )
1117} )
1218
You can’t perform that action at this time.
0 commit comments