Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
test(server): use String.slice() over String.substring() (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 1, 2023
1 parent 2cb5b05 commit 234f8d2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,7 @@ describe("Server deployment", () => {

const location = response.headers.location.toString();
const resQueryString = qs.parse(
location.substring(
location.indexOf("?") + 1,
location.length
)
location.slice(location.indexOf("?") + 1)
);

expect(resQueryString).toMatchObject({
Expand Down Expand Up @@ -802,10 +799,7 @@ describe("Server deployment", () => {

const location = response.headers.location.toString();
const resQueryString = qs.parse(
location.substring(
location.indexOf("?") + 1,
location.length
)
location.slice(location.indexOf("?") + 1)
);

expect(resQueryString).toMatchObject({
Expand Down

0 comments on commit 234f8d2

Please sign in to comment.