From 5570042732c59cef87a03691ab25ed7c0898886e Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 1 Sep 2024 14:17:06 +0200 Subject: [PATCH] Remove unnecessary mock implementations and update web root prefixes middleware test description --- tests/middleware/webRootPrefixes.test.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/middleware/webRootPrefixes.test.js b/tests/middleware/webRootPrefixes.test.js index 3d2447f..c21247c 100644 --- a/tests/middleware/webRootPrefixes.test.js +++ b/tests/middleware/webRootPrefixes.test.js @@ -1,15 +1,11 @@ const middleware = require("../../src/middleware/webRootPostfixes.js"); -const createRegex = require("../../src/utils/createRegex.js"); -const ipMatch = require("../../src/utils/ipMatch.js"); const sanitizeURL = require("../../src/utils/urlSanitizer.js"); const parseURL = require("../../src/utils/urlParser.js"); -jest.mock("../../src/utils/createRegex.js"); -jest.mock("../../src/utils/ipMatch.js"); jest.mock("../../src/utils/urlSanitizer.js"); jest.mock("../../src/utils/urlParser.js"); -describe("Web root postfixes middleware", () => { +describe("Web root prefixes middleware", () => { let req, res, logFacilities, config, next; beforeEach(() => { @@ -31,8 +27,6 @@ describe("Web root postfixes middleware", () => { }; next = jest.fn(); - createRegex.mockReturnValue(new RegExp()); - ipMatch.mockReturnValue(true); sanitizeURL.mockImplementation((url) => url); parseURL.mockImplementation((url) => ({ pathname: url })); });