Merge pull request #395 from dozed/fix-show-response-time

Put constant in outer scope
This commit is contained in:
Anoop M D 2023-10-05 20:50:00 +05:30 committed by GitHub
commit efbc119e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,9 +123,9 @@ const runSingleRequest = async function (
}
let response, responseTime;
const start = Date.now();
try {
// run request
const start = Date.now();
response = await axios(request);
responseTime = Date.now() - start;
} catch (err) {
@ -273,7 +273,8 @@ const runSingleRequest = async function (
status: null,
statusText: null,
headers: null,
data: null
data: null,
responseTime: 0
},
error: err.message,
assertionResults: [],