1
0
Fork 0
peertube/shared/extra-utils/server/clients.ts
Chocobozzz 94565d52bb
Shared utils -> extra-utils
Because they need dev dependencies
2019-04-24 16:25:52 +02:00

19 lines
457 B
TypeScript

import * as request from 'supertest'
import * as urlUtil 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('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
}
// ---------------------------------------------------------------------------
export {
getClient
}