1
0
Fork 0

require added

pull/867/head
Sourav Chanduka 2021-07-20 12:08:25 +05:30
parent f7330892f1
commit c45ad60078
1 changed files with 16 additions and 17 deletions

View File

@ -1,20 +1,19 @@
import {getIDTokenUrl} from './../src/internal/config-variables'
import {HttpClient} from '@actions/http-client'
var httpclient = require("@actions/http-client")
var configvar = require("./../src/internal/config-variables")
test('Get httpclient', () => {
const http = new HttpClient('actions/oidc-client')
expect(http).toBeDefined()
describe('oidc-client-tests', () => {
it('Get Http Client', async () => {
//const http = new httpclient('actions/oidc-client')
expect(httpclient).toBeDefined()
})
test('HTTP get request to get token endpoint', async () => {
const http = new HttpClient('actions/oidc-client')
const res = await http.get(
'https://ghactionsoidc.azurewebsites.net/.well-known/openid-configuration'
)
expect(res.message.statusCode).toBe(200)
})
test('Get token endpoint', async () => {
let url; url = getIDTokenUrl()
it('Get token endpoint', async () => {
let url = await configvar.getIDTokenUrl()
expect(url).toBeDefined()
})
})
/*test('HTTP get request to get token endpoint', async () => {
expect(1).toBe(1)
})*/