From 95d2aeb26e440f503c8ae6f55d192cd4e507bed5 Mon Sep 17 00:00:00 2001 From: Gilbert Gilb's Date: Thu, 22 Oct 2020 19:06:57 +0200 Subject: [PATCH] fix responseURL case --- src/handle_request.js | 2 +- test/basics.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handle_request.js b/src/handle_request.js index d16be1c..99fd3c7 100644 --- a/src/handle_request.js +++ b/src/handle_request.js @@ -27,7 +27,7 @@ function makeResponse(result, config) { headers: result[2], config: config, request: { - responseUrl: config.url, + responseURL: config.url, }, }; } diff --git a/test/basics.spec.js b/test/basics.spec.js index ae2e899..8531eba 100644 --- a/test/basics.spec.js +++ b/test/basics.spec.js @@ -823,7 +823,7 @@ describe("MockAdapter basics", function () { }); }); - it("returns the original request url in the response.request.responseUrl property", function () { + it("returns the original request url in the response.request.responseURL property", function () { mock.onGet("/foo").reply(200, { foo: "bar", }); @@ -831,7 +831,7 @@ describe("MockAdapter basics", function () { return instance.get("/foo").then(function (response) { expect(response.status).to.equal(200); expect(response.data.foo).to.equal("bar"); - expect(response.request.responseUrl).to.equal("/foo"); + expect(response.request.responseURL).to.equal("/foo"); }); });