diff --git a/packages/core/__tests__/core.test.ts b/packages/core/__tests__/core.test.ts index 4371924a..09bc587b 100644 --- a/packages/core/__tests__/core.test.ts +++ b/packages/core/__tests__/core.test.ts @@ -670,12 +670,7 @@ describe('oidc-client-tests', () => { it('HTTP get request to get token endpoint', async () => { const http = new HttpClient('actions/oidc-client') - try { - const res = await http.get(getTokenEndPoint()) - expect(res.message.statusCode).toBe(200) - } - finally { - http.dispose() - } + const res = await http.get(getTokenEndPoint()) + expect(res.message.statusCode).toBe(200) }) }) diff --git a/packages/http-client/__tests__/auth.test.ts b/packages/http-client/__tests__/auth.test.ts index 1bfa8e95..50d0a6a4 100644 --- a/packages/http-client/__tests__/auth.test.ts +++ b/packages/http-client/__tests__/auth.test.ts @@ -59,7 +59,6 @@ describe('auth', () => { const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests', [ ph ]) - try { const res: httpm.HttpClientResponse = await http.get( 'http://postman-echo.com/get' ) @@ -69,9 +68,5 @@ describe('auth', () => { const auth: string = obj.headers.authorization expect(auth).toBe(`Bearer ${token}`) expect(obj.url).toBe('http://postman-echo.com/get') - } - finally { - http.dispose() - } }) })