Hacker News new | ask | show | jobs
by cel1ne 3487 days ago
I switched to tape (the "Test anything protocol" from 1987) and never looked back: https://medium.com/javascript-scene/why-i-use-tape-instead-o...

I use faucet for pretty-printing the output.

4 comments

For people who want to use tape and have TAP support and are using a Jetbrains IDE, vote for TAP support on this ticket:

"Add support for tests that output Test Anything Protocol (TAP)" https://youtrack.jetbrains.com/issue/WEB-20916

I hear you. I've set up testing for angular apps and whilst I don't mind the unit testing with karma/jasmine, when I've used Protractor I've found it unbearable; some functions are exposed as promises, some are not, some are resolved in the 'it' statement, some are not and you have to chain a 'then' and it's anyones guess as to how a particular function behaves.
After discovering TAP a while back I switched a bunch of tests to output in that format, but found that it can't actually be consumed by anything, other than pretty printers (too trivial to bother) or smolder (Web server; too much overkill).

I think there's definitely space for some local commands which graph, analyse, etc. a bunch of TAP, but I haven't found anything like that :(

I never had the need to process the output, I just liked the simple structure of my tests and the plan/count/end system.
Yeah, tape is nice. I don't think Sinon is really the same kind of thing- at least when I used it, it was for things like mocking XHR responses.