Skip to content

Commit

Permalink
test(http-interceptors): add case insensitive header check
Browse files Browse the repository at this point in the history
  • Loading branch information
Convly committed Jan 28, 2025
1 parent 5aced01 commit a2c1b77
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/interceptors/http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ describe('HTTP Interceptors', () => {
// Assert
expect(request.headers.get('Content-Type')).toBe('text/plain');
});

it('should perform case insensitive checks on headers', async () => {
// Arrange
const request = new Request('https://example.com', {
headers: { 'content-type': 'text/plain' },
});

const interceptor = HttpInterceptors.setDefaultHeaders();

// Act
await interceptor({ request });

// Assert
expect(request.headers.get('Content-Type')).toBe('text/plain');
});
});

describe('transformErrors', () => {
Expand Down

0 comments on commit a2c1b77

Please sign in to comment.