Add throw functionality to get more information about errors occurring during tests.

This commit is contained in:
mike12345567 2024-01-24 14:11:24 +00:00
parent 35a3d663ba
commit 1fa319ac9f
1 changed files with 3 additions and 0 deletions

View File

@ -278,6 +278,9 @@ class TestConfiguration {
if (params) {
request.params = params
}
request.throw = (status: number, message: string) => {
throw new Error(`Error ${status} - ${message}`)
}
return this.doInContext(appId, async () => {
await controlFunc(request)
return request.body