Skip to content

Commit

Permalink
Merge pull request sstephenson#270 from bats-core/readme-libraries
Browse files Browse the repository at this point in the history
docs: add list of libraries to README
  • Loading branch information
sublimino authored Apr 7, 2020
2 parents 8e87574 + 5ad582f commit b030e8a
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ each line is an assertion of truth.
* [Running Bats in Docker](#running-bats-in-docker)
+ [Building a Docker image](#building-a-docker-image)
- [Usage](#usage)
* [Parallel Execution](#parallel-execution)
- [Writing tests](#writing-tests)
* [`run`: Test other commands](#run-test-other-commands)
* [`load`: Share common code](#load-share-common-code)
Expand All @@ -60,6 +61,7 @@ each line is an assertion of truth.
* [File descriptor 3 (read this if Bats hangs)](#file-descriptor-3-read-this-if-bats-hangs)
* [Printing to the terminal](#printing-to-the-terminal)
* [Special variables](#special-variables)
* [Libraries and Add-ons](#libraries-and-add-ons)
- [Testing](#testing)
- [Support](#support)
- [Contributing](#contributing)
Expand Down Expand Up @@ -158,8 +160,8 @@ Check out a copy of the Bats repository, then build a container image:
$ docker build --tag bats/bats:latest .

This creates a local Docker image called `bats/bats:latest` based on [Alpine
Linux](https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md)
(to push to private registries, tag it with another organisation, e.g.
Linux](https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md)
(to push to private registries, tag it with another organisation, e.g.
`my-org/bats:latest`).

To run Bats' internal test suite (which is in the container image at
Expand All @@ -172,8 +174,8 @@ to its path inside the container:

$ docker run -it -v "$(pwd):/code" bats/bats:latest /code/test

This is a minimal Docker image. If more tools are required this can be used as a
base image in a Dockerfile using `FROM <Docker image>`. In the future there may
This is a minimal Docker image. If more tools are required this can be used as a
base image in a Dockerfile using `FROM <Docker image>`. In the future there may
be images based on Debian, and/or with more tools installed (`curl` and `openssl`,
for example). If you require a specific configuration please search and +1 an
issue or [raise a new issue](https://github.com/bats-core/bats-core/issues).
Expand Down Expand Up @@ -462,6 +464,21 @@ There are several global variables you can use to introspect on Bats tests:
* `$BATS_TMPDIR` is the location to a directory that may be used to store
temporary files.

### Libraries and Add-ons

Bats supports loading external assertion libraries and helpers. Those under `bats-core` are officially supported libraries (integration tests welcome!):

- https://github.com/bats-core/bats-assert - common assertions for Bats
- https://github.com/bats-core/bats-support - supporting library for Bats test helpers
- https://github.com/bats-core/bats-detik - e2e tests of applications in K8s environments

and some external libraries, supported on a "best-effort" besis:

- https://github.com/ztombol/bats-file (still compatible? Requires review)
- https://github.com/ztombol/bats-docs (still relevant? Requires review)
- https://github.com/grayhemp/bats-mock (as per #147)
- https://github.com/jasonkarns/bats-mock (how is this different from grayhemp/bats-mock?)

## Testing

```sh
Expand Down

0 comments on commit b030e8a

Please sign in to comment.