Fix security vulnerabilities
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user