Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with substack/tape? #30

Closed
dbkaplun opened this issue Oct 26, 2015 · 5 comments
Closed

Does this work with substack/tape? #30

dbkaplun opened this issue Oct 26, 2015 · 5 comments
Labels

Comments

@dbkaplun
Copy link

No description provided.

@twada
Copy link
Member

twada commented Oct 26, 2015

Short Answer: Sorry, No.

Not yet. Once we've tried to and suspened for a while.

@twada
Copy link
Member

twada commented Oct 28, 2015

added to FAQ then closed.
Thank you for your question.

@twada twada closed this as completed Oct 28, 2015
@ELLIOTTCABLE
Copy link

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?

@twada twada added the question label Jun 10, 2016
@dead-claudia
Copy link

dead-claudia commented Jun 12, 2016

@ELLIOTTCABLE

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.
var assert = 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.

@caesarsol
Copy link

Hi, is anything changed regarding to this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants