ZUnit is a powerful unit testing framework for ZSH
Go to file
2019-02-20 12:11:50 +00:00
src Version number changed 2018-01-04 23:32:33 +00:00
tests Add tests for assertion false-positives with empty values 2018-01-04 23:32:33 +00:00
.gitattributes Add .gitattributes file 2016-09-28 09:28:54 +01:00
.gitignore Separate source files, and add Makefile to compile 2017-02-25 11:25:25 +00:00
.guardian.yml Build and run tests automatically when source files change 2017-02-25 11:25:28 +00:00
.travis.yml Enable travis slack notifications 2019-02-20 12:11:50 +00:00
.zunit.yml Add --verbose option 2017-07-10 19:12:14 +01:00
.zvmrc First attempt at using zvm to test multiple versions 2017-02-18 16:22:16 +00:00
build.zsh Switch from Makefile to simple ZSH build script 2017-02-25 11:25:27 +00:00
code-of-conduct.md Add code of conduct and contribution guidelines 2017-01-27 17:14:06 +00:00
contributing.md Update repository URLs 2017-07-10 19:12:14 +01:00
LICENSE First commit 2016-09-05 22:10:10 +01:00
README.md Remove mention of color from README 2017-07-10 19:12:14 +01:00
zunit.zsh-completion Update completion 2017-07-10 19:12:14 +01:00

ZUnit

GitHub release Build Status 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.

Zulu

zulu install zunit

NOTE: In versions of Zulu prior to 1.2.0, there is an additional step required after install:

cd ~/.zulu/packages/zunit
./build.zsh
zulu link zunit

Homebrew

brew install zunit-zsh/zunit/zunit

Manual

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

ZUnit requires Revolver to be installed, and in your $PATH. The zulu or homebrew installation methods will install this dependency for you.

Writing Tests

Test syntax

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

#!/usr/bin/env zunit

@test 'My first test' {
	# Test contents here
}

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

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

ZUnit is licensed under The MIT License (MIT)

Team