How to Create bats-core Files
Files with extension
.bats are displayed with a little bat icon to tell that it’s a bats-core file.
BashSupport Pro comes with a basic template for bats-core tests. Files with a
#!/usr/bin/bats shebang line are also supported, but new files created with the actions always get a
.bats file extension.
If you don’t like the guided steps below, just create a file with a
.bats extension or a bats shebang line, as you’re used to.
BashSupport Pro helps you to manage bats-core files:
- First, choose File → New from the main menu.
- Click on the item bats-core Test. A new dialog pops up.
- Now enter the name of the new bats-core file and confirm by Enter . The file extension
.batsis automatically appended if you don’t enter it.
- BashSupport Pro now creates the new file and opens an editor to show it. The file already contains a simple test setup to run your first test.