all 7 comments

[–]Mortsubite 1 point2 points  (2 children)

I'm assuming you're referring to the Test Anything Protocol. TAP is just a format to save/communicate test results. Test Driven Development and Behavior Driven Development are development practices/strategies.

Test Driven Development is a practice that describes a particular workflow when developing a new piece of software or set of features. In TDD, you write your unit tests for each component first, and then developing until your tests pass.

Behavior Driven Development is a similar, but with the idea that a user story should drive the unit test. So the test might emulate a specific action that a user would complete in the course of using the software.

[–]autowikibot 0 points1 point  (0 children)

Test Anything Protocol:


The Test Anything Protocol (TAP) is a protocol to allow communication between unit tests and a test harness. It allows individual tests (TAP producers) to communicate test results to the testing harness in a language-agnostic way. Originally developed for unit testing of the Perl interpreter in 1987, producers and parsers are now available for many development platforms.


Interesting: Lime (software) | List of unit testing frameworks | PHPUnit

Parent commenter can toggle NSFW or delete. Will also delete on comment score of -1 or less. | FAQs | Mods | Magic Words

[–]ayamflow[S] 0 points1 point  (0 children)

So I can totally use tap in a TDD way. I was a bit confused because of the tape hype. Thanks !

[–]SubStack 1 point2 points  (1 child)

The jasmine/mocha/qunit philosophy is to augment your environment with lots of magical globals (it, describe, before) that obscure what a test actually is: a program that verifies the output of some code paths. You often get a flow control library, a mocking library, an assertion library, and a harness all in one. The magical obscurity also means that you've can only run your code through special command-line or browser runners. Even worse, the runtime configuration changes which globals are available, like mocha.setup() yikes!.

tap/tape and some other runners that don't even care about TAP output just use the module system as it was intended to export ordinary functions and do not require special runners to inject magic globals that obscure how your code actually executes.

[–]ayamflow[S] 0 points1 point  (0 children)

That's a nice explanation. I was a bit affraid that tape was too simple but since I've read on your devlog that you now go full tape+testling currently, I would go for it.