Skip to content

Commit

Permalink
chore: fix usage of URL
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel committed Oct 30, 2020
1 parent 7dfd2c8 commit 89a8b0d
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion eventarc/audit-storage/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(base_url.trim(), route), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion eventarc/generic/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion eventarc/pubsub/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/hello-broken/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const get = (route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return request(URL(base_url.trim(), route), {
return request(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/helloworld/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const get = (route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return request(URL(base_url.trim(), route), {
return request(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/image-processing/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/markdown-preview/renderer/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(route, new URL(base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/pubsub/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down
2 changes: 1 addition & 1 deletion run/system-package/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const request = (method, route, base_url) => {
throw Error('"ID_TOKEN" environment variable is required.');
}

return got(URL(base_url.trim(), route), {
return got(new URL(route, base_url.trim()), {
headers: {
Authorization: `Bearer ${ID_TOKEN.trim()}`,
},
Expand Down

0 comments on commit 89a8b0d

Please sign in to comment.