Fix security vulnerabilities

This commit is contained in:
2026-10-13 15:52:34 +01:00
parent 74103a19c9
commit eefb2ea5d2
46 changed files with 375 additions and 403 deletions
@@ -1,5 +1,6 @@
import { afterEach, describe, expect, mock, test } from "bun:test";
import path from "path";
import type { GrabPageComponentRes } from "../../../types";
mock.module("../../../../src/utils/log", () => ({
log: {
@@ -42,7 +43,10 @@ describe("grabPageComponent", () => {
});
console.log("DEBUG-404:", res instanceof Response ? "Response" : JSON.stringify(res));
expect(res.serverRes?.response_options?.status).toBe(404);
expect(res).not.toBeInstanceOf(Response);
expect(
(res as GrabPageComponentRes).serverRes?.response_options?.status,
).toBe(404);
expect(log.error).not.toHaveBeenCalled();
});
});