AfterSpec() of Report is not getting executed #224
Answered
by
ASaiAnudeep
mihirsasmal
asked this question in
Q&A
-
AfterSpec() of Report is not getting executed when I am using typescript and when the test fails. It works perfectly when used in javascript.
However, same when i convert in typescript, it does not work
Am I doing something wrong here ? |
Beta Was this translation helpful? Give feedback.
Answered by
ASaiAnudeep
Oct 21, 2022
Replies: 1 comment 1 reply
-
I'm not able to reproduce the issue. The below code is working perfectly fine. import { reporter, spec } from "pactum";
reporter.add({
name: 's',
afterSpec(data) {
console.log(data.request);
},
afterStep(data) {
console.log(data);
},
afterInteraction(data) {
console.log(data);
},
afterTest(data) {
console.log(data);
},
end() {
}
});
spec()
.get('https://github.com/pactumjs/pactum/discussions/224')
.expectStatus(200)
.toss() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mihirsasmal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not able to reproduce the issue. The below code is working perfectly fine.