chore: fix cli tests (#2412)

* fix tests for bruno-electron & bruno-lang

* chore: fix validatioon breaking cli tests
This commit is contained in:
lohit 2024-06-05 20:31:31 +05:30 committed by GitHub
parent 811a6e6034
commit f9b33dde38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,7 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
}
if (typeof request.data === 'string') {
if (request.data.length) {
if (request?.data?.length) {
request.data = _interpolate(request.data);
}
}
@ -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://')) {