0.1.4 • Published 2 years ago

jest-bats v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

jest-bats

Run Bats tests with Jest

jest-bats is a simple jest plugin that enables testing bash scripts in a npm project.
It uses bats under the hood to run the tests, and transforms the results to a format that jest understands.

Install

npm install --save-dev jest-bats

Usage

jest-bats should be configured as a jest preset. You will most likely want to include it in the 'projects' option of jest, as this will enable support for both bats and javascript tests. To do so, simply add this to your package.json:

{
  "jest": {
    "projects": [
      { "preset": "jest-bats" },
      { "displayName": "node" }
    ]
  }
}

If you only have bats scripts to test in your project, you can set jest-bats as the global preset in your package.json: { "jest": { "preset": "jest-bats" } }.

For a live example, you can check this project's jest.config.js file and sample tests under the examples folder.

License

jest-bats is MIT licensed

0.1.4

2 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago