diff --git a/test/normalize-arguments.ts b/test/normalize-arguments.ts index a02802d72..7c0985dd1 100644 --- a/test/normalize-arguments.ts +++ b/test/normalize-arguments.ts @@ -133,3 +133,20 @@ test('maxRetryAfter is calculated seperately from request timeout', t => { t.is(options.retry.maxRetryAfter, 300); }); + +test('extending responseType', async t => { + const instance1 = got.extend({ + prefixUrl: 'https://localhost', + responseType: 'json' + }); + + const instance2 = got.extend({ + headers: { + 'x-test': 'test' + } + }); + + const merged = instance1.extend(instance2); + + t.is(merged.defaults.options.responseType, 'json'); +});