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

Post Node 14: Replace tape with node:test? #277

Open
voxpelli opened this issue Nov 29, 2021 · 12 comments
Open

Post Node 14: Replace tape with node:test? #277

voxpelli opened this issue Nov 29, 2021 · 12 comments
Labels
maintenance Issues that covers general maintenance chores

Comments

@voxpelli
Copy link
Member

voxpelli commented Nov 29, 2021

It was a long time since tape received any updates and brittle has emerged as the new TAP test framework "for modern times" node:test is now included with Node.js itself and makes sense to use.

I would suggest moving to brittle node:test once we drop support for Node 12.

@voxpelli voxpelli added the maintenance Issues that covers general maintenance chores label Nov 29, 2021
@theoludwig
Copy link
Contributor

What are the advantages to use brittle instead of tape, except that tape didn't received any updates since long time ?

There are also ava or uvu test runners to consider, it is worth taking a look.

@voxpelli
Copy link
Member Author

I would say that brittle is the modern incarnation of tape.

I myself use mocha + chai in my projects, but swapping to mocha, ava or something similar would be a more major undertaking + not really vibe with the original spirit of tape

@voxpelli
Copy link
Member Author

Similar move: hypercore-protocol/hypercore-next#39

@LinusU
Copy link
Member

LinusU commented Nov 30, 2021

Brittle seems very new and only have ~90 weekly downloads compared to ~640,000 for tape. Doesn't have to mean anything if the later is getting actively maintained, but could potentially be smart to hold on for a little while...

I myself also use mocha (but without chai though) mostly, and Jest/AVA for larger projects.

edit: actually, I see no problems with switching right away actually, seems like other projects are doing it and it only affects our tests

@voxpelli
Copy link
Member Author

My impression was that more repositories was about to move to it, but I see now that there aren't that many 🤔 https://github.com/davidmarkclements/brittle/network/dependents?dependent_type=REPOSITORY

@voxpelli
Copy link
Member Author

Found the thread I remembered on Twitter with eg. @mcollina: https://twitter.com/matteocollina/status/1447973242581524486

@mcollina
Copy link

I cannot move any of my repositories until I have to support Node v12.

@voxpelli
Copy link
Member Author

voxpelli commented Nov 30, 2021

@mcollina But you will after Node 12 has left LTS in about six months time?

@mcollina
Copy link

I'll start testing/using it with smaller repos first and then slowly migrate. The integrated runner with the additional code coverage tool based on c8 is likely worth the switch from tape & tap.

@voxpelli voxpelli changed the title Post Node 12: Replace tape with brittle? Post Node 12: Replace tape with node:test? May 30, 2023
@voxpelli
Copy link
Member Author

I would suggest going with node:test instead as Node >=16 is what should be targeted going forward, see: #278

@voxpelli voxpelli changed the title Post Node 12: Replace tape with node:test? Post Node 14: Replace tape with node:test? May 30, 2023
@bcomnes
Copy link
Member

bcomnes commented Jun 21, 2023

+1 on moving to a runtime solution though I don't have the bandwidth to do it myself.

@voxpelli
Copy link
Member Author

For reference, I did this over here for another project: yikesable/fastify-acl@7871e87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issues that covers general maintenance chores
Projects
Status: No status
Development

No branches or pull requests

5 participants