diff --git a/test/urllib.options.allowH2.test.ts b/test/urllib.options.allowH2.test.ts new file mode 100644 index 00000000..061c4241 --- /dev/null +++ b/test/urllib.options.allowH2.test.ts @@ -0,0 +1,13 @@ +import { strict as assert } from 'node:assert'; +import { describe, it } from 'vitest'; +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', { + allowH2: true, + dataType: 'json', + }); + assert.equal(response.status, 200); + }); +}); diff --git a/test/options.rejectUnauthorized-false.test.ts b/test/urllib.options.rejectUnauthorized-false.test.ts similarity index 96% rename from test/options.rejectUnauthorized-false.test.ts rename to test/urllib.options.rejectUnauthorized-false.test.ts index b1c81826..e5512403 100644 --- a/test/options.rejectUnauthorized-false.test.ts +++ b/test/urllib.options.rejectUnauthorized-false.test.ts @@ -6,7 +6,7 @@ import selfsigned from 'selfsigned'; import urllib, { HttpClient } from '../src/index.js'; import { startServer } from './fixtures/server.js'; -describe('options.rejectUnauthorized-false.test.ts', () => { +describe('urllib.options.rejectUnauthorized-false.test.ts', () => { let close: any; let _url: string; beforeAll(async () => {