tapjs/tap-parser

Stubbed/skipped results appear, but cannot figure out why

Closed this issue · 2 comments

I am seeing this final output, with "tap-parser": "^5.4.0"

# tests 4
# pass 2
# fail 2
# stubbed 2
# skipped 2

what perplexes me is that I see 2 for both stubbed and skipped, yet this is what I have:

 const p = parser();

  p.on('complete', function(data: string){
    resultBroadcaster.emit(String(events.TAP_COMPLETE), data);
  });

  p.on('assert', function (testpoint) {

    resultBroadcaster.emit(String(events.TEST_CASE_END), testpoint);

    if (testpoint.skip) {
      throw new Error('testpoint.skip');     // <<<<< throw
    }
    else if (testpoint.todo) {
      throw new Error('testpoint.todo/stubbed');   // <<<<< throw
    }
    else if (testpoint.ok) {
      resultBroadcaster.emit(String(events.TEST_CASE_PASS), testpoint);
    }
    else {
      resultBroadcaster.emit(String(events.TEST_CASE_FAIL), testpoint);
    }
  });

With these thrown errors, I am like 99.99% certain that no todo/skip events are happening. Am I just misinterpreting the output? I am no TAP expert.

thanks :)

any word on this bird? This one seems really strange, and I am still seeing it.

Ancient.