Skip to content

A powerful testing framework for ZSH projects

License

Notifications You must be signed in to change notification settings

vladdoster/zunit

 
 

Repository files navigation

ZUnit

GitHub release Gitter

ZUnit is a powerful unit testing framework for ZSH

Installation

WARNING: Although the majority of ZUnit's functionality works as expected, it is in the early stages of development, and as such bugs are likely to be present. Please continue with caution, and report any issues you may have.

zinit for \
	as'command' \
	atclone'./build.zsh' \
	light-mode \
	nocompile \
	pick'zunit' \
	@zdharma-continuum/zunit

Manual

git clone https://github.com/zdharma-continuum/zunit.git
cd zunit
./build.zsh
chmod u+x ./zunit
cp ./zunit /usr/local/bin

Writing Tests

Test syntax

Tests in ZUnit have a simple syntax, which is inspired by the BATS framework.

#!/usr/bin/env zunit

@test 'example test' {
	# test logic
}

The body of each test can contain any valid ZSH code. The zunit shebang #!/usr/bin/env zunit MUST appear at the top of each test file, or ZUnit will not run it.

Documentation

For a full breakdown of ZUnit's syntax and functionality, check out the official documentation.

Contributing

All contributions are welcome, and encouraged. Please read our contribution guidelines and code of conduct for more information.

License

ZUnit is licensed under The MIT License (MIT)

Copyright (c) 2016 - 2022 James Dinsdale hi@molovo.co (molovo.co)

Copyright (c) 2022 zdharma-continuum https://github.com/zdharma-continuum

About

A powerful testing framework for ZSH projects

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 99.9%
  • Makefile 0.1%