News for hackers. Stuff that matters.
Re:Bashunit by khru on Tuesday September 26, 2023 @06:36PM (#37666752)
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

Re:Bashunit by jjgreen on Tuesday September 26, 2023 @06:45PM (#37666851)
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.

Re:Bashunit by khru on Tuesday September 26, 2023 @06:49PM (#37666885)
What's BATS?
Re:Bashunit by jjgreen on Tuesday September 26, 2023 @06:50PM (#37666901)
Re:Bashunit by jonmayer on Tuesday September 26, 2023 @08:40PM (#37668092)
The more I use BATS, the more I want to give the new kid on the block a try.
Re:Bashunit by oweiler on Wednesday September 27, 2023 @01:15AM (#37670476)
Works fine for me. On the other hand I wonder why such a framework needs to be written in Bash itself.
Re:Bashunit by khru on Wednesday September 27, 2023 @01:51AM (#37670682)
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

Re:Bashunit by khru on Wednesday September 27, 2023 @01:46AM (#37670658)
What do you mean?
Re:Bashunit by Katarn on Tuesday October 03, 2023 @04:25AM (#37749258)
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.

Re:Bashunit by Chemaclass on Wednesday September 27, 2023 @04:49AM (#37671921)
Awesome!