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 new file with a
.bats extension or a
#!/usr/bin/bats shebang line.
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
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.