Skip to content

Commit

Permalink
fix(DEVX-363): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lojzatran committed Dec 16, 2024
1 parent cf47f21 commit c65d875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe('Correlation ID and user agent middlewares', () => {
)

const response = await apiRootV3.get().execute()
expect(response.headers?.['x-correlation-id'][0]).toEqual(correlationId)
expect(response.headers?.['x-correlation-id']).toEqual(correlationId)
expect((response?.originalRequest as any).headers['User-Agent']).toContain(
'test-app/commercetools-sdk-javascript-v3'
)
Expand Down
5 changes: 2 additions & 3 deletions packages/sdk-client-v3/src/utils/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default function getHeaders(

// whatwg-fetch
const map: JsonObject<string> = {}
return headers.forEach(
(value: any, name: string | number) => (map[name] = value)
)
headers.forEach((value: any, name: string | number) => (map[name] = value))
return map
}

0 comments on commit c65d875

Please sign in to comment.