fix tests for bruno-electron & bruno-lang (#2410)

This commit is contained in:
lohit 2024-06-04 14:17:36 +05:30 committed by GitHub
parent ee4dba54f3
commit bcdbc0ebed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 5 deletions

View File

@ -86,7 +86,7 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
param.value = _interpolate(param.value);
});
if (request.params.length) {
if (request?.params?.length) {
let url = request.url;
if (!url.startsWith('http://') && !url.startsWith('https://')) {

View File

@ -5,17 +5,21 @@ meta {
}
get {
url: https://api.textlocal.in/send
url: https://api.textlocal.in/send/:id
body: json
auth: bearer
}
query {
params:query {
apiKey: secret
numbers: 998877665
~message: hello
}
params:path {
id: 123
}
headers {
content-type: application/json
Authorization: Bearer 123

View File

@ -6,25 +6,34 @@
},
"http": {
"method": "get",
"url": "https://api.textlocal.in/send",
"url": "https://api.textlocal.in/send/:id",
"body": "json",
"auth": "bearer"
},
"query": [
"params": [
{
"name": "apiKey",
"value": "secret",
"type": "query",
"enabled": true
},
{
"name": "numbers",
"value": "998877665",
"type": "query",
"enabled": true
},
{
"name": "message",
"value": "hello",
"type": "query",
"enabled": false
},
{
"name": "id",
"value": "123",
"type": "path",
"enabled": true
}
],
"headers": [