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
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); param.value = _interpolate(param.value);
}); });
if (request.params.length) { if (request?.params?.length) {
let url = request.url; let url = request.url;
if (!url.startsWith('http://') && !url.startsWith('https://')) { if (!url.startsWith('http://') && !url.startsWith('https://')) {

View File

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

View File

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