-
-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
And leave out 0.8, since it ships with a broken npm.
Travis failures are because of nodejs/node#1854 |
Works as expected. Many thanks! 👍✨ |
@isaacs I was working under the assumption that the yamlish diag follows directly after the assert line. The additional tests change the logic a little bit I agree. Also I was fixing the assert event position, rather than the comment one, but if that doesn't cause any problems I'm fine with not having it fixed. I'll make a few more tests these days and I'll let you know if something doesn't work for me. |
@simov They do, except that comments and blank lines can occur anywhere within a TAP stream, which is why the comment originally appeared before the assert. We don't yet know that the assert is finished, but we do know that the comment is done, so my thinking was, go ahead and emit it now. (Blank lines aren't a problem because we just ignore those.) Note that
That parses as: [ [ 'version', '13' ],
[ 'plan', { start: 1, end: 1 } ],
[ 'extra', 'blearggy blags\n' ],
[ 'extra', 'again with the weirds\n' ],
[ 'assert', { ok: false, id: 1, name: 'weirdness' } ],
[ 'complete',
{ ok: false,
count: 1,
pass: 0,
fail: 1,
plan: { start: 1, end: 1 } } ] ] We can of course just buffer 'extra' lines like we do comments, but since those are technically parse errors anyway, maybe it's not as big a deal? |
@isaacs I was probably misguided by the fact that the As for the A small quote from the spec:
In my understanding the If I put the following code on top of each of my test files, I can then listen for var it = require('tape')
it('file test1.js', function (t) {
console.log('file test1.js')
t.end()
}) |
Keep a queue of comments that occur when we're waiting on potential
diags for a previous assert.
Then emit those comment events all at once when we are sure that either
the test point line is finished (without diags) or that the diags are
done.
Fix #18
Fix #19
Fix #20
r? @simov @anko