bats-core / bats-assert

Common assertions for Bats
Creative Commons Zero v1.0 Universal
94 stars 39 forks source link

Test failure due to hard dependency path it test_helper.bash #34

Closed flickerfly closed 1 year ago

flickerfly commented 3 years ago

When trying to test the bats-assert module, I was getting this error: bats: /opt/bats-helpers/bats-assert/test/../node_modules/bats-support/load.bash does not exist I resolved it with sed -i 's/node_modules/../g' /opt/bats-helpers/bats-assert/test/test_helper.bash

This appears to be managed by bats-support and bats-files test_helper.bash scripts with a bit more flexibility that can probably be nearly copy and pasted.

hyperupcall commented 2 years ago

For anyone else with this issue, it is also solvable by doing

cd /path/to/bats-support
yarn link # can also do 'npm link'

cd /path/to/bats-assert
yarn link bats-support # can also do `npm link bats-support`

This allows the dependency to 'install' (symlink) properly

martin-schulze-vireso commented 1 year ago

Fixed via #49