mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 17:15:43 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
cf3087d7ca
commit
7fc954a6dc
@@ -55,6 +55,24 @@ describe('UrlListInput.vue add fallback', () => {
|
|||||||
expect(urls.value).toEqual(['tcp://0.0.0.0:11010'])
|
expect(urls.value).toEqual(['tcp://0.0.0.0:11010'])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('falls back to the first available protocol when tcp is not present', async () => {
|
||||||
|
const { wrapper, urls } = mountUrlListInput({ udp: 22000 })
|
||||||
|
|
||||||
|
await wrapper.find('.cursor-pointer').trigger('click')
|
||||||
|
await nextTick()
|
||||||
|
|
||||||
|
expect(urls.value).toEqual(['udp://0.0.0.0:22000'])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('falls back to tcp default port when protos is empty', async () => {
|
||||||
|
const { wrapper, urls } = mountUrlListInput({})
|
||||||
|
|
||||||
|
await wrapper.find('.cursor-pointer').trigger('click')
|
||||||
|
await nextTick()
|
||||||
|
|
||||||
|
expect(urls.value).toEqual(['tcp://0.0.0.0:11010'])
|
||||||
|
})
|
||||||
|
|
||||||
it('supports port-zero fallback from protos', async () => {
|
it('supports port-zero fallback from protos', async () => {
|
||||||
const { wrapper, urls } = mountUrlListInput({ tcp: 0, udp: 0 })
|
const { wrapper, urls } = mountUrlListInput({ tcp: 0, udp: 0 })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user