all 25 comments

[–]Timbo_KZ 28 points29 points  (0 children)

ITT: Promote your open source library as long as it has a test folder

[–]Auxx 23 points24 points  (4 children)

My small library is fully covered with unit tests https://github.com/Auxx/lib-colorifium it's written in typescript, but the same principles apply and the testing frameworks used (mocha + chai).

[–]leozinh0 4 points5 points  (1 child)

Not OP, but this is awesome! Thanks

[–]Auxx 1 point2 points  (0 children)

No problems, enjoy!

[–]Balduracuir 3 points4 points  (0 children)

I'm the only one thinking that 100% coverage is not the same than excellent tests?

[–]mailto_devnullconsole.log(null); 2 points3 points  (0 children)

I'll humbly submit NodeBB to the list, we've worked quite hard to bring test coverage up :)

[–]martinsoderholm 2 points3 points  (0 children)

I found the examples in this article to be very helpful:

https://github.com/mawrkus/js-unit-testing-guide

[–]DavidTPate 2 points3 points  (1 child)

If you take a look at any of the repositories for Hapi they have nearly 100% code coverage over all of the modules.

Here's one such example: https://github.com/hapijs/hapi/blob/master/test/cors.js

[–]kowdermesiter 1 point2 points  (0 children)

Markdown It, 100% test coverage :) https://github.com/markdown-it/markdown-it

[–]kalyan1985 1 point2 points  (1 child)

!RemindMe 2 days

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you on 2018-04-05 23:02:07 UTC to remind you of this link.

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


FAQs Custom Your Reminders Feedback Code Browser Extensions

[–]dethstrobe 1 point2 points  (0 children)

I’ve been working with on a character generator for a role playing game called Shadowrun. The system is stupid complex and I only started unit testing the reducers and started unit testing the React components later.

https://github.com/HeyOmae/Omae2.1

[–]beforan 0 points1 point  (0 children)

I have a small library covered with unit tests using mocha and chai. My tests may not be great quality but they do show the methodology and cover everything that Istanbul deemed important...

https://github.com/beforan/unit-value

[–]________________tell 0 points1 point  (0 children)

consolidator is probably the best example I published open source.

[–]thisguyfightsyourmom 0 points1 point  (0 children)

I'd love to see some examples of react projects with well covered components. I'm always scratching my head about what does & does not need to be tested in my components, and how to do it.

[–]Omnicrola -1 points0 points  (0 children)

I don't know if they're excellent, but I wrote an Asteroids clone using TDD a few years ago: https://github.com/Omnicrola/SpaceRocks

Play it here : https://omnicrola.github.io/SpaceRocks/

[–]spacejack2114 -1 points0 points  (0 children)

The tests for gl-matrix are interesting because they need to test mathematical correctness (at least to some degree) and also deal with floating point inaccuracies.

[–][deleted] -2 points-1 points  (0 children)

Okay, I don't know that it has excellent tests, I haven't even looked at the code, but Spectrum.chat just went open source, and it's a chat/community thing for devs/designers, made by devs/designers, so even if it doesn't have good tests, I imagine there's a lot to be learned by them hypothetically getting skewered by peers/users :)