Skip to content

Commit 573571d

Browse files
committed
test: remove deprecated bypass option tests
1 parent 67c0784 commit 573571d

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

test/server/proxy-option.test.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use strict";
22

33
const path = require("node:path");
4-
const util = require("node:util");
54
const express = require("express");
65
const request = require("supertest");
76
const webpack = require("webpack");
@@ -222,26 +221,6 @@ describe("proxy option", () => {
222221
});
223222

224223
describe("bypass", () => {
225-
it("should log deprecation warning when bypass is used", async () => {
226-
const utilSpy = jest.spyOn(util, "deprecate");
227-
228-
const response = await req.get("/foo/bar.html");
229-
230-
expect(response.status).toBe(200);
231-
expect(response.text).toContain("Hello");
232-
233-
const lastCall = utilSpy.mock.calls[utilSpy.mock.calls.length - 1];
234-
235-
expect(lastCall[1]).toBe(
236-
"Using the 'bypass' option is deprecated. Please use the 'router' or 'context' options. Read more at https://github.com/chimurai/http-proxy-middleware/tree/v2.0.6#http-proxy-middleware-options",
237-
);
238-
expect(lastCall[2]).toBe(
239-
"DEP_WEBPACK_DEV_SERVER_PROXY_BYPASS_ARGUMENT",
240-
);
241-
242-
utilSpy.mockRestore();
243-
});
244-
245224
it("can rewrite a request path", async () => {
246225
const response = await req.get("/foo/bar.html");
247226

0 commit comments

Comments
 (0)