Skip to content

Commit

Permalink
Revert "Fix ipWhiteList test (MagicMirrorOrg#3181)"
Browse files Browse the repository at this point in the history
  • Loading branch information
khassel committed Sep 7, 2023
1 parent 717397d commit 1ec4ad7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/configs/empty_ipWhiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* MIT Licensed.
*/
let config = require(`${process.cwd()}/tests/configs/default.js`).configFactory({
ipWhitelist: [],
port: 8282
ipWhitelist: []
});

/*************** DO NOT EDIT THE LINE BELOW ***************/
Expand Down
3 changes: 1 addition & 2 deletions tests/configs/noIpWhiteList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* MIT Licensed.
*/
let config = require(`${process.cwd()}/tests/configs/default.js`).configFactory({
ipWhitelist: ["x.x.x.x"],
port: 8181
ipWhitelist: ["x.x.x.x"]
});

/*************** DO NOT EDIT THE LINE BELOW ***************/
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/ipWhitelist_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("ipWhitelist directive configuration", () => {
});

it("should return 403", async () => {
const res = await fetch("http://localhost:8181");
const res = await fetch("http://localhost:8080");
expect(res.status).toBe(403);
});
});
Expand All @@ -24,7 +24,7 @@ describe("ipWhitelist directive configuration", () => {
});

it("should return 200", async () => {
const res = await fetch("http://localhost:8282");
const res = await fetch("http://localhost:8080");
expect(res.status).toBe(200);
});
});
Expand Down
1 change: 1 addition & 0 deletions tests/unit/functions/server_functions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe("server_functions tests", () => {
},
text: fetchResponseHeadersText
};
// eslint-disable-next-line
fetch = jest.fn();
fetch.mockImplementation(() => fetchResponse);

Expand Down

0 comments on commit 1ec4ad7

Please sign in to comment.