mirror of
https://gitea.com/actions/checkout.git
synced 2025-02-06 00:46:11 +08:00
Compare commits
2 Commits
19060a122d
...
041723abcc
Author | SHA1 | Date | |
---|---|---|---|
|
041723abcc | ||
|
813c3f2d82 |
@ -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://europe.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()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -20,14 +19,14 @@ 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.fabrikam.com')
|
||||||
).toBe('https://src.onpremise.customer.com/api/v3')
|
).toBe('https://src.onpremise.fabrikam.com/api/v3')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user