A Bats test for Sublime Text.
The easiest way to install using Package Control.
-
Open
Command Palette
using menu itemTools → Command Palette...
-
Choose
Package Control: Install Package
-
Find
Bats
and hitEnter
If you prefer a manual approach, follow the steps below.
-
Goto into Sublime Text Packages directory, which you can find using the menu item
Preferences -> Browse Packages...
-
Clone this repository.
git clone https://github.com/sptndc/sublime-bats.git Bats
-
Enjoy!
All .bats
files should automatically be assigned the
Bash Automated Testing System (bats)
language/grammar.
The following snippets exist:
bats
- use at the top of a file to set the shebang to#!/usr/bin/env bats
.test
- inserts a@test "test something" { … }
test block.lines
- inserts a[ "${lines[0]}" = "some value" ]
assertion.status
- inserts a[ "$status" -eq 0 ]
assertion.
Please feel free to submit pull requests and report a bugs on the issue tracker.
This project was released under the MIT License.