Files
toolkit/packages/oidc-client/__tests__/main.test.ts
T

19 lines
583 B
TypeScript
Raw Normal View History

2021-07-20 15:56:28 +05:30
var httpclient = require('@actions/http-client')
2021-07-29 12:17:22 +05:30
function getTokenEndPoint() {
return 'https://vstoken.actions.githubusercontent.com/.well-known/openid-configuration'
}
2021-07-01 08:11:28 +05:30
2021-07-20 12:08:25 +05:30
describe('oidc-client-tests', () => {
it('Get Http Client', async () => {
2021-07-20 15:56:28 +05:30
const http = new httpclient.HttpClient('actions/oidc-client')
expect(http).toBeDefined()
})
it('HTTP get request to get token endpoint', async () => {
const http = new httpclient.HttpClient('actions/oidc-client')
2021-07-29 12:17:22 +05:30
const res = await http.get(getTokenEndPoint())
2021-07-20 15:56:28 +05:30
expect(res.message.statusCode).toBe(200)
2021-07-20 12:08:25 +05:30
})
2021-07-01 08:11:28 +05:30
})