X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fserver%2Fclients.ts;h=dc631e82318d3dd034aa5f7486f1314345b47987;hb=5baee5fca418487e72ddcd6419d31bca8659b668;hp=273aac74728ffe355258a68903c0ca3aa8e6280d;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/server/clients.ts b/shared/extra-utils/server/clients.ts index 273aac747..dc631e823 100644 --- a/shared/extra-utils/server/clients.ts +++ b/shared/extra-utils/server/clients.ts @@ -1,12 +1,12 @@ import * as request from 'supertest' -import * as urlUtil from 'url' +import { URL } from 'url' function getClient (url: string) { const path = '/api/v1/oauth-clients/local' return request(url) .get(path) - .set('Host', urlUtil.parse(url).host) + .set('Host', new URL(url).host) .set('Accept', 'application/json') .expect(200) .expect('Content-Type', /json/)