diff --git a/packages/oas-to-har/test/parameters.test.ts b/packages/oas-to-har/test/parameters.test.ts index 497f86f4..a1617fe8 100644 --- a/packages/oas-to-har/test/parameters.test.ts +++ b/packages/oas-to-har/test/parameters.test.ts @@ -143,7 +143,7 @@ describe('parameter handling', () => { ); it( - 'should pass in value if one is set and prioritise provided values', + 'should pass in value if one is set and prioritize provided values', assertQueryParams( { parameters: [{ name: 'a', in: 'query', required: true, schema: { default: 'value' } }], @@ -401,7 +401,7 @@ describe('parameter handling', () => { ); it( - 'should pass in value if one is set and prioritise provided values', + 'should pass in value if one is set and prioritize provided values', assertHeaders( { parameters: [{ name: 'a', in: 'header', required: true, schema: { default: 'value' } }], @@ -411,6 +411,17 @@ describe('parameter handling', () => { ), ); + it( + 'should retain defined header casing', + assertHeaders( + { + parameters: [{ name: 'reqKey', in: 'header', required: true, schema: { default: 'value' } }], + }, + { header: { reqKey: 'test' } }, + [{ name: 'reqKey', value: 'test' }], + ), + ); + it( 'should pass an `accept` header if endpoint expects a content back from response', assertHeaders( diff --git a/packages/oas-to-har/test/requestBody.test.ts b/packages/oas-to-har/test/requestBody.test.ts index 3de989af..185488a8 100644 --- a/packages/oas-to-har/test/requestBody.test.ts +++ b/packages/oas-to-har/test/requestBody.test.ts @@ -66,7 +66,7 @@ describe('request body handling', () => { expect(oasToHar(spec, spec.operation('/requestBody', 'post')).log.entries[0].request.postData).toBeUndefined(); }); - it('should pass in value if one is set and prioritise provided values', () => { + it('should pass in value if one is set and prioritize provided values', () => { const spec = Oas.init({ paths: { '/requestBody': { @@ -1070,7 +1070,7 @@ describe('request body handling', () => { expect(har.log.entries[0].request.postData).toBeUndefined(); }); - it('should pass in value if one is set and prioritise provided values', () => { + it('should pass in value if one is set and prioritize provided values', () => { const spec = Oas.init({ paths: { '/requestBody': { @@ -1206,7 +1206,7 @@ describe('request body handling', () => { }); // Whether this is right or wrong, i'm not sure but this is what readme currently does - it('should prioritise json if it exists', async () => { + it('should prioritize json if it exists', async () => { const contentSpec = Oas.init({ paths: { '/requestBody': { diff --git a/packages/oas/test/operation.test.ts b/packages/oas/test/operation.test.ts index 013d4611..63f97a07 100644 --- a/packages/oas/test/operation.test.ts +++ b/packages/oas/test/operation.test.ts @@ -166,7 +166,7 @@ describe('#getContentType()', () => { expect(petstore.operation('/pet', 'post').getContentType()).toBe('application/json'); }); - it('should prioritise json if it exists', () => { + it('should prioritize json if it exists', () => { expect( new Operation(petstore.getDefinition(), '/body', 'get', { requestBody: {