Files
prowler/ui/hooks/use-finding-group-resource-state.test.ts
T

21 lines
787 B
TypeScript

import { readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";
describe("useFindingGroupResourceState", () => {
const currentDir = path.dirname(fileURLToPath(import.meta.url));
const filePath = path.join(currentDir, "use-finding-group-resource-state.ts");
const source = readFileSync(filePath, "utf8");
it("enables muted findings only for the finding-group resource drawer", () => {
expect(source).toContain("includeMutedInOtherFindings: true");
});
it("applies the shared default muted filter before fetching group resources", () => {
expect(source).toContain("applyDefaultMutedFilter(filters)");
expect(source).toContain("filters: effectiveFilters");
});
});