Skip to content

Commit c33e8e8

Browse files
fix ci
1 parent 88a3fbb commit c33e8e8

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@farfetched/core": minor
2+
'@farfetched/core': minor
33
---
44

5-
Added a new feature - `mapError` mapper to all Queries
5+
Added a new feature - `mapError` mapper to all Queries and Mutations

packages/core/src/mutation/__tests__/create_json_mutation.response.map_error.test-d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('createJsonMutation', () => {
4848
request: { url: 'http://api.salo.com', method: 'POST' as const },
4949
response: {
5050
contract: unknownContract,
51-
mapError: () => ({ code: 'ERROR', message: 'test' } as const),
51+
mapError: () => ({ code: 'ERROR', message: 'test' }) as const,
5252
},
5353
});
5454

@@ -90,7 +90,7 @@ describe('createJsonMutation', () => {
9090
contract: unknownContract,
9191
mapError: {
9292
source: createStore(42),
93-
fn: () => ({ errorCode: 123 } as const),
93+
fn: () => ({ errorCode: 123 }) as const,
9494
},
9595
},
9696
});
@@ -123,4 +123,3 @@ describe('createJsonMutation', () => {
123123
});
124124
});
125125
});
126-

packages/core/src/mutation/__tests__/create_json_mutation.response.map_error.test.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ describe('remote_data/mutation/json.response.map_failure', () => {
145145
],
146146
});
147147

148-
createWatch({ unit: mutation.finished.failure, fn: failureHandler, scope });
148+
createWatch({
149+
unit: mutation.finished.failure,
150+
fn: failureHandler,
151+
scope,
152+
});
149153

150154
await allSettled(mutation.start, { scope });
151155

@@ -186,7 +190,11 @@ describe('remote_data/mutation/json.response.map_failure', () => {
186190
],
187191
});
188192

189-
createWatch({ unit: mutation.finished.failure, fn: failureHandler, scope });
193+
createWatch({
194+
unit: mutation.finished.failure,
195+
fn: failureHandler,
196+
scope,
197+
});
190198

191199
await allSettled(mutation.start, { scope });
192200

@@ -219,7 +227,11 @@ describe('remote_data/mutation/json.response.map_failure', () => {
219227
],
220228
});
221229

222-
createWatch({ unit: mutation.finished.failure, fn: failureHandler, scope });
230+
createWatch({
231+
unit: mutation.finished.failure,
232+
fn: failureHandler,
233+
scope,
234+
});
223235

224236
await allSettled(mutation.start, { scope });
225237

@@ -264,7 +276,11 @@ describe('remote_data/mutation/json.response.map_failure', () => {
264276
],
265277
});
266278

267-
createWatch({ unit: mutation.finished.failure, fn: failureHandler, scope });
279+
createWatch({
280+
unit: mutation.finished.failure,
281+
fn: failureHandler,
282+
scope,
283+
});
268284

269285
await allSettled(mutation.start, { scope });
270286

packages/core/src/query/__tests__/create_json_query.response.map_error.test-d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('createJsonQuery', () => {
4848
request: { url: 'http://api.salo.com', method: 'GET' as const },
4949
response: {
5050
contract: unknownContract,
51-
mapError: () => ({ code: 'ERROR', message: 'test' } as const),
51+
mapError: () => ({ code: 'ERROR', message: 'test' }) as const,
5252
},
5353
});
5454

@@ -63,7 +63,7 @@ describe('createJsonQuery', () => {
6363
request: { url: 'http://api.salo.com', method: 'GET' as const },
6464
response: {
6565
contract: unknownContract,
66-
mapError: () => ({ code: 'ERROR', message: 'test' } as const),
66+
mapError: () => ({ code: 'ERROR', message: 'test' }) as const,
6767
},
6868
});
6969

@@ -105,7 +105,7 @@ describe('createJsonQuery', () => {
105105
contract: unknownContract,
106106
mapError: {
107107
source: createStore(42),
108-
fn: () => ({ errorCode: 123 } as const),
108+
fn: () => ({ errorCode: 123 }) as const,
109109
},
110110
},
111111
});
@@ -123,7 +123,7 @@ describe('createJsonQuery', () => {
123123
contract: unknownContract,
124124
mapError: {
125125
source: createStore(42),
126-
fn: () => ({ errorCode: 123 } as const),
126+
fn: () => ({ errorCode: 123 }) as const,
127127
},
128128
},
129129
});
@@ -160,4 +160,3 @@ describe('createJsonQuery', () => {
160160
});
161161
});
162162
});
163-

0 commit comments

Comments
 (0)