Skip to content

AfterSpec() of Report is not getting executed #224

Answered by ASaiAnudeep
mihirsasmal asked this question in Q&A
Discussion options

You must be logged in to vote

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()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mihirsasmal
Comment options

Answer selected by mihirsasmal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants