Add throw functionality to get more information about errors occurring during tests.
This commit is contained in:
parent
35a3d663ba
commit
1fa319ac9f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue