mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
35 lines
851 B
TypeScript
35 lines
851 B
TypeScript
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
|
const importFresh = async () => {
|
|
vi.resetModules();
|
|
return import("./deployment");
|
|
};
|
|
|
|
describe("enterprise feature flags", () => {
|
|
afterEach(() => {
|
|
vi.unstubAllEnvs();
|
|
});
|
|
|
|
it("should keep grouped Jira dispatch disabled outside cloud", async () => {
|
|
// Given
|
|
vi.stubEnv("UI_CLOUD_ENABLED", "false");
|
|
|
|
// When
|
|
const { isGroupedJiraDispatchEnabled } = await importFresh();
|
|
|
|
// Then
|
|
expect(isGroupedJiraDispatchEnabled()).toBe(false);
|
|
});
|
|
|
|
it("should enable grouped Jira dispatch in cloud without an enterprise flag", async () => {
|
|
// Given
|
|
vi.stubEnv("UI_CLOUD_ENABLED", "true");
|
|
|
|
// When
|
|
const { isGroupedJiraDispatchEnabled } = await importFresh();
|
|
|
|
// Then
|
|
expect(isGroupedJiraDispatchEnabled()).toBe(true);
|
|
});
|
|
});
|