If your environment is POSIX, testing scripts with tool written in POSIX shell, like shellspec[1], might also be a choice.
[1] https://shellspec.info/