You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you expand on this a bit, please? The README says that you can simply ‘use assert instead’ (i.e. not run your code through the power-assert module); wouldn't that mean that TAP is implicitly supported?
How, precisely, is TAP output not possible with power-assert?
Tape actually wraps Node's assertions directly, to something along the lines of this:
// Obviously, it's a lot more sophisticated than this, because// assertion messages need printed, etc.varassert=require("assert")Object.keys(assert).forEach(function(key){Test.prototype[key]=function(){try{assert[key].apply(assert,arguments)}catch(e){this.fail(e.message)return}this.pass()}})
Because it wraps Node's native methods from directly requiring them internally, and it does not catch and report thrown errors, there's no way to support it without either the user using tape-catch or power-assert reinventing much of that and/or Tape's test handling magic.
Activity
twada commentedon Oct 26, 2015
Short Answer: Sorry, No.
Not yet. Once we've tried to and suspened for a while.
twada commentedon Oct 28, 2015
added to FAQ then closed.
Thank you for your question.
ELLIOTTCABLE commentedon May 15, 2016
Can you expand on this a bit, please? The README says that you can simply ‘use assert instead’ (i.e. not run your code through the power-assert module); wouldn't that mean that TAP is implicitly supported?
How, precisely, is TAP output not possible with power-assert?
dead-claudia commentedon Jun 12, 2016
@ELLIOTTCABLE
Tape actually wraps Node's assertions directly, to something along the lines of this:
Because it wraps Node's native methods from directly requiring them internally, and it does not catch and report thrown errors, there's no way to support it without either the user using tape-catch or power-assert reinventing much of that and/or Tape's test handling magic.
caesarsol commentedon Nov 23, 2017
Hi, is anything changed regarding to this? :)