From 283e58d26e220d5b2e1ef8f75ab7b5cb849d4bcf Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Tue, 7 Jul 2026 18:58:59 +0300 Subject: [PATCH] rm unused --- .../src/__tests__/helpers/constants.test.ts | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 client_v3/src/__tests__/helpers/constants.test.ts diff --git a/client_v3/src/__tests__/helpers/constants.test.ts b/client_v3/src/__tests__/helpers/constants.test.ts deleted file mode 100644 index 3e02c1453..000000000 --- a/client_v3/src/__tests__/helpers/constants.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; - -vi.mock('panel/common/intl', () => ({ - default: { getMessage: vi.fn((key: string) => key) }, -})); - -import { getUpstreamModeOptions } from '../../components/DnsSettings/helpers'; -import { DNS_REQUEST_OPTIONS } from 'panel/helpers/constants'; - -describe('getUpstreamModeOptions', () => { - beforeEach(() => vi.clearAllMocks()); - - it('returns exactly 3 options (FR-003)', () => { - const options = getUpstreamModeOptions(); - expect(options).toHaveLength(3); - }); - - it('returns LOAD_BALANCING, PARALLEL, FASTEST_ADDR values (FR-003)', () => { - const options = getUpstreamModeOptions(); - expect(options[0].value).toBe(DNS_REQUEST_OPTIONS.LOAD_BALANCING); - expect(options[1].value).toBe(DNS_REQUEST_OPTIONS.PARALLEL); - expect(options[2].value).toBe(DNS_REQUEST_OPTIONS.FASTEST_ADDR); - }); - - it('returns i18n-correct text (factory re-executes getMessage)', () => { - const options = getUpstreamModeOptions(); - expect(options[0].text).toBe('upstream_dns_load_balancing'); - expect(options[1].text).toBe('upstream_dns_parallel_requests'); - expect(options[2].text).toBe('upstream_dns_fastest_addr'); - }); - - it('returns warning only for fastest_addr option', () => { - const options = getUpstreamModeOptions(); - expect(options[0].warning).toBeUndefined(); - expect(options[1].warning).toBeUndefined(); - expect(options[2].warning).toBe('upstream_dns_fastest_addr_warning'); - }); -});