-
Notifications
You must be signed in to change notification settings - Fork 409
Install Bats Using a Package
You may be able to find 🦇 Bats pre-packaged for your operating system or distribution. If available, such a package may offer a convenient alternative to cloning the Github repository:
- The installation is usually shared by all users on the system.
- The
bats
command will typically be available without configuration of any kind. - Updates and bug fixes may be provided via the regular stream of package updates for your system.
- ⭕️ Windows
- ⭕️ Ubuntu
- 🤠 Fedora
- 🦎 openSUSE
- 🐧 Arch Linux
- 🗻 Alpine Linux
- 🍎 Mac OSX
- Installation with npm
- Installation with bpkg
- Installation with Basher
⚠️ Caution: This repository 📦 distributessstephenson
bats v0.4.0 🐼
See node/npm option below
sudo add-apt-repository ppa:duggan/bats
sudo apt-get update
sudo apt-get install bats
- TODO: ☎️ make contact with @duggan and/or @neurodebian and get the current
bats-core
packaged 📦 .
sudo dnf install bats
Bats is available for openSUSE Tumbleweed, as well as for openSUSE Leap 42.1 and later releases:
zypper install bats
For older releases, take a look at the development project on OBS (Open Build Service). You may find a repository containing a package for your target release, or build your own package using the sources found there.
⚠️ Caution: The community repository 📦 distributessstephenson
bats v0.4.0
Bats is available for Arch Linux via AUR using your favourite AUR helper.
pacaur -Sa bats-core
To install the old, sstephenson
bats
# coreutils is needed because busybox `readlink` is not supported by BATS
sudo apk add coreutils bats
sudo apk add ncurses # Needed to support 'pretty' output
to install the newer bats-core
sudo apk add coreutils ncurses
curl -#L https://github.com/bats-core/bats-core/archive/master.zip | unzip -
sudo bash bats-core-master/install.sh /usr/local
rm -rf ./bats-core-master
Bats is available for Mac OSX using brew. If you don’t have brew already, discover and install it from here.
brew install bats-core
You can install the bats-core npm package globally with:
$ npm install -g bats
Installation with bpkg
$ bpkg install -g bats-core/bats-core
Installation with Basher
basher install bats-core/bats-core
Which installs the GIT master version. To be able to check out other versions, add this before the command: BASHER_FULL_CLONE=true
Table of Contents partially generated with markdown-toc
This community-maintained documentation for Bats is about core/master
,
see sidebar interwiki or the about page for more info.