diff --git a/package-lock.json b/package-lock.json index d015ea8..bab3d99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "is-buffer": "^2.0.5" }, "devDependencies": { - "axios": "^1.7.3", + "axios": "^1.7.4", "chai": "^4.3.6", "eslint": "^9.8.0", "mocha": "^10.7.0", @@ -1098,9 +1098,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", - "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dev": true, "dependencies": { "follow-redirects": "^1.15.6", @@ -5179,9 +5179,9 @@ "dev": true }, "axios": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", - "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dev": true, "requires": { "follow-redirects": "^1.15.6", diff --git a/package.json b/package.json index 1e4f0a2..7b0c260 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "axios": ">= 0.17.0" }, "devDependencies": { - "axios": "^1.7.3", + "axios": "^1.7.4", "chai": "^4.3.6", "eslint": "^9.8.0", "mocha": "^10.7.0", diff --git a/test/pass_through.spec.js b/test/pass_through.spec.js index 0169a78..8f62570 100644 --- a/test/pass_through.spec.js +++ b/test/pass_through.spec.js @@ -1,5 +1,4 @@ const axios = require("axios"); -const isLegacyAxios = require("axios/package.json").version[0] === "0"; const expect = require("chai").expect; const createServer = require("http").createServer; @@ -107,7 +106,7 @@ describe("passThrough tests (requires Node)", function () { it("handles baseURL correctly", function () { instance = axios.create({ - baseURL: "/test", + baseURL: "http://localhost/test", proxy: { host: "127.0.0.1", port: httpServer.address().port, @@ -118,12 +117,7 @@ describe("passThrough tests (requires Node)", function () { mock.onAny().passThrough(); return instance.get("/foo").then(function (response) { expect(response.status).to.equal(200); - - if (isLegacyAxios) { - expect(response.data).to.equal("http://null/test/foo"); - } else { - expect(response.data).to.equal("http://localhost/test/foo"); - } + expect(response.data).to.equal("http://localhost/test/foo"); }); }); diff --git a/test/pass_through_on_no_match.spec.js b/test/pass_through_on_no_match.spec.js index 40c35de..e7bc63a 100644 --- a/test/pass_through_on_no_match.spec.js +++ b/test/pass_through_on_no_match.spec.js @@ -1,5 +1,4 @@ const axios = require("axios"); -const isLegacyAxios = require("axios/package.json").version[0] === "0"; const expect = require("chai").expect; const createServer = require("http").createServer; @@ -113,7 +112,7 @@ describe("onNoMatch=passthrough option tests (requires Node)", function () { it("handles baseURL correctly", function () { instance = axios.create({ - baseURL: "/test", + baseURL: "http://localhost/test", proxy: { host: "127.0.0.1", port: httpServer.address().port, @@ -123,11 +122,7 @@ describe("onNoMatch=passthrough option tests (requires Node)", function () { return instance.get("/foo").then(function (response) { expect(response.status).to.equal(200); - if (isLegacyAxios) { - expect(response.data).to.equal("http://null/test/foo"); - } else { - expect(response.data).to.equal("http://localhost/test/foo"); - } + expect(response.data).to.equal("http://localhost/test/foo"); }); });