tapjs / tap-parser

parse the test anything protocol
121 stars 35 forks source link

Stubbed/skipped results appear, but cannot figure out why #55

Closed ORESoftware closed 4 years ago

ORESoftware commented 7 years ago

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

ORESoftware commented 7 years ago

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

isaacs commented 4 years ago

Ancient.