clients.ts 457 B

12345678910111213141516171819
  1. import * as request from 'supertest'
  2. import * as urlUtil from 'url'
  3. function getClient (url: string) {
  4. const path = '/api/v1/oauth-clients/local'
  5. return request(url)
  6. .get(path)
  7. .set('Host', urlUtil.parse(url).host)
  8. .set('Accept', 'application/json')
  9. .expect(200)
  10. .expect('Content-Type', /json/)
  11. }
  12. // ---------------------------------------------------------------------------
  13. export {
  14. getClient
  15. }