Template
1
0
mirror of http://gitea.com/actions/checkout synced 2024-11-30 21:22:26 +08:00

updated unit tests

This commit is contained in:
John Wesley Walker III 2024-10-17 11:56:31 +00:00
parent 813c3f2d82
commit 041723abcc

View File

@ -4,10 +4,9 @@ describe('isGhes tests', () => {
it('basics', async () => { it('basics', async () => {
expect(urlHelper.isGhes()).toBeFalsy() expect(urlHelper.isGhes()).toBeFalsy()
expect(urlHelper.isGhes('https://github.com')).toBeFalsy() expect(urlHelper.isGhes('https://github.com')).toBeFalsy()
//expect(urlHelper.isGhes('https://api.github.com')).toBeFalsy()
expect(urlHelper.isGhes('https://contoso.ghe.com')).toBeFalsy() expect(urlHelper.isGhes('https://contoso.ghe.com')).toBeFalsy()
expect(urlHelper.isGhes('https://test.github.localhost')).toBeFalsy() expect(urlHelper.isGhes('https://test.github.localhost')).toBeFalsy()
expect(urlHelper.isGhes('https://src.onpremise.customer.com')).toBeTruthy() expect(urlHelper.isGhes('https://src.onpremise.fabrikam.com')).toBeTruthy()
}) })
}) })
@ -27,7 +26,7 @@ describe('getServerApiUrl tests', () => {
'https://api.fabrikam.ghe.com' 'https://api.fabrikam.ghe.com'
) )
expect( expect(
urlHelper.getServerApiUrl('https://src.onpremise.customer.com') urlHelper.getServerApiUrl('https://src.onpremise.fabrikam.com')
).toBe('https://src.onpremise.customer.com/api/v3') ).toBe('https://src.onpremise.fabrikam.com/api/v3')
}) })
}) })