1.3.1 • Published 7 months ago

@drevops/bats-helpers v1.3.1

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
7 months ago

GitHub Issues GitHub Pull Requests Test codecov GitHub release (latest by date) LICENSE


Features

Installation

npm install -D bats-helpers@npm:@drevops/bats-helpers

Usage

  1. Create a _loader.bash file next to your BATS tests with content:

    export BATS_LIB_PATH="${BATS_TEST_DIRNAME}/../node_modules"
    bats_load_library bats-helpers
  2. Use load _loader.bash in every BATS file:

    #!/usr/bin/env bats
    load _loader
    
    @test "My test" {
      run ls
      assert_success
    }

Why not bats-assert, bats-file, bats-support

The goal is to merge is to eventually merge this package with bats-assert.

However: 1. This package has more assertions and tests. They were battle-tested on many projects and were waiting for BATS to provide support for libraries functionality to be extracted into a standalone package. 2. Those packages have outdated version constraints which leads to conflicts.

Acknowledgments

The mocking functionality is based on the bats-mock project. A special thank you to the contributors for their original work.

Maintenance

npm install

npm run lint

npm run test

Publishing

npm version minor

git push

npm publish
1.3.1

7 months ago

1.2.2

8 months ago

1.3.0

7 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago