#!/usr/bin/env bash
set -eo pipefail

main() {
  declare FILE_NAME="$1"

  mkdir -p test-results/bats
  pushd tests/unit >/dev/null
  bats --report-formatter junit --output ../../test-results/bats "$FILE_NAME.bats"
  popd &>/dev/null

  ls -lah test-results/bats
}

main "$@"
