Skip to content
A powerful testing framework for ZSH projects
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Add .gitattributes file Sep 28, 2016
.guardian.yml Build and run tests automatically when source files change Feb 25, 2017
.zvmrc First attempt at using zvm to test multiple versions Feb 18, 2017
build.zsh Switch from Makefile to simple ZSH build script Feb 25, 2017
zunit.zsh-completion Update completion Jul 10, 2017


GitHub release Build Status Gitter

ZUnit is a powerful unit testing framework for ZSH


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 install zunit

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

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


brew install zunit-zsh/zunit/zunit


git clone
cd ./zunit
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.


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


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


Copyright (c) 2016 James Dinsdale (

ZUnit is licensed under The MIT License (MIT)


You can’t perform that action at this time.