Skip to content

Commit b971bc7

Browse files
committedDec 14, 2018
jest-fetch-mock update means new Headers-polyfill behavior. Dup headers are now merged.
1 parent 1934107 commit b971bc7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎src/__tests__/restLink.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -2207,11 +2207,10 @@ describe('Query options', () => {
22072207

22082208
const requestCall = fetchMock.calls('/api/post/1')[0];
22092209
expect(orderDupPreservingFlattenedHeaders(requestCall[1])).toEqual([
2210-
'setup: setup',
2211-
'setup: in-context duplicate setup',
22122210
'accept: application/json',
22132211
'authorization: 1234',
22142212
'context: context',
2213+
'setup: setup, in-context duplicate setup',
22152214
]);
22162215
});
22172216
it('respects context-provided header-merge policy', async () => {
@@ -2328,9 +2327,8 @@ describe('Query options', () => {
23282327
orderedFlattened.push(`${key}: ${value}`);
23292328
});
23302329
expect(orderedFlattened).toEqual([
2331-
'authorization: initial setup',
2332-
'authorization: context',
23332330
'accept: application/json',
2331+
'authorization: initial setup, context',
23342332
]);
23352333
});
23362334
it('generates a new headers object if headers are undefined', async () => {

0 commit comments

Comments
 (0)
Please sign in to comment.