Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 7, 2024
1 parent dc478f0 commit 723591f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions test/urllib.options.allowH2.test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 723591f

Please sign in to comment.