1
0
Fork 0
peertube/shared/utils/server/clients.ts
buoyantair 9639bd1757 Move utils to /shared
Move utils used by /server/tools/* & /server/tests/**/* into
/shared folder.

Issue: #1336
2018-10-29 22:18:31 +05:30

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
}