import { describe, test, expect } from 'vitest';
import { DeploymentTypeEnum, isBrowserTelemetryEnabled } from './env.js';
describe('isBrowserTelemetryEnabled', () => {
    test('returns true for CLOUD deployment', () => {
        expect(isBrowserTelemetryEnabled(DeploymentTypeEnum.CLOUD)).toBe(true);
    });
    test('returns false for CLOUD_PREM deployment', () => {
        expect(isBrowserTelemetryEnabled(DeploymentTypeEnum.CLOUD_PREM)).toBe(false);
    });
    test('returns false when deploymentType is undefined (fail-closed on ambiguity)', () => {
        expect(isBrowserTelemetryEnabled(undefined)).toBe(false);
    });
    test("returns false for empty string (helm configmap renders '' when deploymentType override is missing)", () => {
        expect(isBrowserTelemetryEnabled('')).toBe(false);
    });
    test('returns false for common typos that would bypass a blocklist check', () => {
        expect(isBrowserTelemetryEnabled('cloud_prem')).toBe(false);
        expect(isBrowserTelemetryEnabled('CLOUD-PREM')).toBe(false);
        expect(isBrowserTelemetryEnabled('cloud-prem ')).toBe(false);
    });
});
//# sourceMappingURL=env.test.js.map