@@ -31,7 +31,7 @@ test('should return passed document type if already resolved', async () => {
31
31
32
32
test ( 'should resolve document type from API on undefined type (with loading state)' , async ( ) => {
33
33
const client = createMockSanityClient ( )
34
- const response = defer ( ( ) => of ( [ 'book' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
34
+ const response = defer ( ( ) => of ( 'book' ) . pipe ( observeOn ( asyncScheduler ) ) )
35
35
36
36
client . observable . fetch = vi . fn ( ( ) => response )
37
37
@@ -75,8 +75,8 @@ test('should return correct document type on document type transition', async ()
75
75
test ( 'should return correct document type on document ID transition' , async ( ) => {
76
76
const client = createMockSanityClient ( )
77
77
78
- const responseGrrm = defer ( ( ) => of ( [ 'author' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
79
- const responseGot = defer ( ( ) => of ( [ 'book' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
78
+ const responseGrrm = defer ( ( ) => of ( 'author' ) . pipe ( observeOn ( asyncScheduler ) ) )
79
+ const responseGot = defer ( ( ) => of ( 'book' ) . pipe ( observeOn ( asyncScheduler ) ) )
80
80
81
81
client . observable . fetch = ( _query , params ) =>
82
82
params . publishedId === 'grrm' ? responseGrrm : responseGot
@@ -102,7 +102,7 @@ test('should return correct document type on document ID transition', async () =
102
102
test ( 'should return correct document type when transitioning from undefined type to specified type' , async ( ) => {
103
103
const client = createMockSanityClient ( )
104
104
105
- const responseGrrm = defer ( ( ) => of ( [ 'author' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
105
+ const responseGrrm = defer ( ( ) => of ( 'author' ) . pipe ( observeOn ( asyncScheduler ) ) )
106
106
107
107
client . observable . fetch = vi . fn < typeof client . observable . fetch > ( ) . mockReturnValue ( responseGrrm )
108
108
@@ -132,7 +132,7 @@ test('should return correct document type when transitioning from undefined type
132
132
test ( 'should return correct document type when transitioning from specified to undefined type' , async ( ) => {
133
133
const client = createMockSanityClient ( )
134
134
135
- const responseGrrm = defer ( ( ) => of ( [ 'person' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
135
+ const responseGrrm = defer ( ( ) => of ( 'person' ) . pipe ( observeOn ( asyncScheduler ) ) )
136
136
137
137
client . observable . fetch = vi . fn < typeof client . observable . fetch > ( ) . mockReturnValue ( responseGrrm )
138
138
@@ -166,7 +166,7 @@ test('should cancel ongoing requests when transitioning document ID', async () =
166
166
const responseDelayedGrrm = defer ( ( ) =>
167
167
of ( [ 'person' ] ) . pipe ( observeOn ( asyncScheduler ) , delay ( 5000 ) , tap ( hasResolvedFirst ) ) ,
168
168
)
169
- const responseGot = defer ( ( ) => of ( [ 'book' ] ) . pipe ( observeOn ( asyncScheduler ) ) )
169
+ const responseGot = defer ( ( ) => of ( 'book' ) . pipe ( observeOn ( asyncScheduler ) ) )
170
170
171
171
client . observable . fetch = vi
172
172
. fn < typeof client . observable . fetch > ( )
0 commit comments