pactum
pactum copied to clipboard
Custom expect handler does not print request and response when the assertion fails.
Describe the bug Most expect methods print the request and response when the assertion fails. However, the custom expect handler does not show these objects.
To Reproduce Steps to reproduce the behavior:
const spec = pactum.spec();
spec.get(url);
await spec.toss();
await spec.response().to.have._((ctx) => {
assert.fail('error');
});
Expected behavior It should show the request and response as other methods do.
Software (please complete the following information):
- OS: Linux
- NodeJS: 16.1
- Pactum: 3.0.19
Thanks for Reporting. I will look into it.