httpyac
httpyac copied to clipboard
console log of cli with error is missing current httpRegion title/ name
Behavior is noticed in Bug: #245
Running this (same as before):
# @import ./common.http
{{
module.exports = require('../../tests/')
}}
### Test 1
# @ref common
https://httpbin.org/status/200
{{
tests.status.is(test, response, { val: 200 })
}}
### Test 2
POST https://httpbin.org/post
Content-Type: application/json
{{_undefinedStuff}}
{{
tests.status.is(test, response, { val: 200 })
}}
I get this:
---------------------
=== Test common ===
GET https://httpbin.org/status/200
=> 200 (751 ms, 184 B)
✓ Status is valid
---------------------
=== Test 1 ===
GET https://httpbin.org/status/200
=> 200 (555 ms, 184 B)
✓ Status is valid
expression _undefinedStuff throws error
https://httpbin.org/post {
protocol: 'HTTP',
url: 'https://httpbin.org/post',
method: 'POST',
...
- Run
test 1
:- Run @ref (
common
) =>common
header + result (ok) - Run
test 1
=>test 1
header + result (ok)
- Run @ref (
- Running test 2 => no header + result (error)
The order now seems fine, but the throw may prevent the proper logging of the test info.