4 ms·
I switched to tape (the "Test anything protocol" from 1987) and never looked back: https://medium.com/javascript-scene/why-i-use-tape-instead-of-mocha-so-should
by cel1ne 10y 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-of-mocha-so-should-you-6aa105d8eaf4 https://medium.com/javascript-scene/why-i-use-tape-instead-o...
I use faucet for pretty-printing the output.
- Noseshine 10y agoFor 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 https://youtrack.jetbrains.com/issue/WEB-20916
- chriswarbo 10y agoAfter 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 :(
- cel1ne 10y agoI never had the need to process the output, I just liked the simple structure of my tests and the plan/count/end system.
- sjclemmy 10y agoI 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.
- draw_down 10y agoYeah, 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.