Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

:bug: Fixed #644

Liyas Thomas0533f3a0709c
diff --git a/pages/index.vue b/pages/index.vue
index 1915a9388..7828c53f9 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -2132,16 +2132,6 @@ export default {
}
}
})()
- // tests
- const syntheticResponse = {
- status: this.response.status,
- body: this.response.body,
- headers: this.response.headers,
- }
- const { testResults } = runTestScriptWithVariables(this.testScript, {
- response: syntheticResponse,
- })
- this.testReports = testResults
} catch (error) {
console.error(error)
if (error.response) {
@@ -2187,6 +2177,16 @@ export default {
}
}
}
+ // tests
+ const syntheticResponse = {
+ status: this.response.status,
+ body: this.response.body,
+ headers: this.response.headers,
+ }
+ const { testResults } = runTestScriptWithVariables(this.testScript, {
+ response: syntheticResponse,
+ })
+ this.testReports = testResults
},
getQueryStringFromPath() {
let queryString