TB

typeddevs/bashunit

Developer tools
424 stars Качество 42 Тренд 42

A simple testing framework for bash scripts

Обзор

A simple testing framework for bash scripts

README

A simple testing framework for bash scripts

Test your bash scripts in the fastest and simplest way.

Why bashunit

A lightweight, fast testing framework for Bash 3.0+, focused on developer experience. It ships 93 assertions plus spies, mocks, data providers, snapshots and more.

Quick start

Install the latest version into your project:

curl -s https://bashunit.com/install.sh | bash

Write a test in tests/example_test.sh:

#!/usr/bin/env bash

function test_bashunit_is_working() {
  assert_same "bashunit is working" "bashunit is working"
}

Run it:

./lib/bashunit tests/

Assertions at a glance

One representative example per family — the full catalogue and every signature is at bashunit.com/assertions, or run bashunit doc locally:

Documentation

Full documentation, covering installation options, every feature and examples, lives at bashunit.com.

Shell tab-completion for bash and zsh is available under completions/ — see the installation docs.

Using an AI coding agent? bashunit.com/ai-agents covers machine-readable results and the API traps that make generated bash tests pass for the wrong reason. The docs are also published as plain text at llms.txt and llms-full.txt, with a drop-in skill at bashunit-skill.md.

Contribute

Issues, ideas and pull requests are welcome. See the contribution guide to set up your environment.

View this README on GitHub

Рекомендуемые инструменты

Попробуйте другой запрос или уберите фильтр.

Установка

npx skillfish add typeddevs/bashunit