mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-21 02:44:16 +00:00
18 lines
664 B
TypeScript
18 lines
664 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("events timeline", () => {
|
|
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
const filePath = path.join(currentDir, "events-timeline.tsx");
|
|
const source = readFileSync(filePath, "utf8");
|
|
|
|
it("delegates resource event loading to a dedicated hook instead of using useEffect in the component", () => {
|
|
expect(source).toContain("useResourceEventsTimeline");
|
|
expect(source).not.toContain("getResourceEvents");
|
|
expect(source).not.toContain("useEffect(");
|
|
});
|
|
});
|