1
0
Fork 0
peertube/shared/extra-utils/server/clients.ts
2020-02-03 08:31:02 +01:00

19 lines
446 B
TypeScript

import * as request from 'supertest'
import { URL } from 'url'
function getClient (url: string) {
const path = '/api/v1/oauth-clients/local'
return request(url)
.get(path)
.set('Host', new URL(url).host)
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
}
// ---------------------------------------------------------------------------
export {
getClient
}