Hacker News new | past | comments | ask | show | jobs | submit login
Bashunit (typeddevs.com)
23 points by khru on Sept 26, 2023 | hide | past | favorite | 13 comments



I have a project in production and we have some bash scripts and I would like to test to be more sure that everything works as it should and I have been recommended this library that has a great maintenance and it is very active. What do you think?

https://bashunit.typeddevs.com/ https://github.com/TypedDevs/bashunit


A bit odd that someone would take this on when BATS is there already. I had a quick look, seems OK apart from the strange choice of camel-case for the assertions, perhaps they're trying to attract the JS/TS crowd?

The more choice the better I suppose, but I think I'll be sticking to BATS.


Thank you very much for your comment. We are just starting to adapt to the more widespread standards within the bash community. We initially focused on getting a solid MVP and didn't give much thought to the fact that using camelCase might seem strange to more experienced members of the community.

In our latest version, we've migrated all the assertions to be snake_case, and we're now gradually doing the same with the library's internal code.


The more I use BATS, the more I want to give the new kid on the block a try.


Works fine for me. On the other hand I wonder why such a framework needs to be written in Bash itself.


Why not? I think that having a testing framework for a "language" that forces you to have another "language" to be able to test is a pain.

Example: let's imagine that to test PHP you had to have Java installed.

What would happen if I got a Java exception or a similar problem? I would have to know Java.

With this example the only thing I wanted to comment is that the Development experience would most likely not be the best


What do you mean?


What's BATS?



Awesome!


They repeatedly name a parameter "callable", but call the function themselves inside string interpolation. This only works out how they need when it's the last parameter.


What would be the correct term instead of "callable"? It seems you have quite a bit of experience with bash. Would you like to help us with the library?


How would you do It then?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: