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

Apply suggestions from @easyt

Co-authored-by: Erez Testiler <easyt@github.com>
This commit is contained in:
John Wesley Walker III 2024-10-17 13:49:31 +02:00 committed by GitHub
parent 19060a122d
commit 813c3f2d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ describe('isGhes tests', () => {
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://api.github.com')).toBeFalsy()
expect(urlHelper.isGhes('https://europe.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.customer.com')).toBeTruthy()
}) })
@ -20,11 +20,11 @@ describe('getServerApiUrl tests', () => {
expect(urlHelper.getServerApiUrl('https://GitHub.com')).toBe( expect(urlHelper.getServerApiUrl('https://GitHub.com')).toBe(
'https://api.github.com' 'https://api.github.com'
) )
expect(urlHelper.getServerApiUrl('https://europe.ghe.com')).toBe( expect(urlHelper.getServerApiUrl('https://contoso.ghe.com')).toBe(
'https://api.europe.ghe.com' 'https://api.contoso.ghe.com'
) )
expect(urlHelper.getServerApiUrl('https://australia.GHE.COM')).toBe( expect(urlHelper.getServerApiUrl('https://fabrikam.GHE.COM')).toBe(
'https://api.australia.ghe.com' 'https://api.fabrikam.ghe.com'
) )
expect( expect(
urlHelper.getServerApiUrl('https://src.onpremise.customer.com') urlHelper.getServerApiUrl('https://src.onpremise.customer.com')