From cca519c70e7dc864151f8c758df8361157dcd302 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sat, 7 Dec 2024 19:38:38 +0800 Subject: [PATCH] f --- test/urllib.options.allowH2.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/urllib.options.allowH2.test.ts b/test/urllib.options.allowH2.test.ts index 061c424..1dd78dd 100644 --- a/test/urllib.options.allowH2.test.ts +++ b/test/urllib.options.allowH2.test.ts @@ -4,7 +4,13 @@ import urllib from '../src/index.js'; describe('urllib.options.allowH2.test.ts', () => { it('should 200 on options.allowH2 = true', async () => { - const response = await urllib.request('https://registry.npmmirror.com', { + let response = await urllib.request('https://registry.npmmirror.com', { + allowH2: true, + dataType: 'json', + }); + assert.equal(response.status, 200); + + response = await urllib.curl('https://registry.npmmirror.com', { allowH2: true, dataType: 'json', });