Skip to content

shahms/neotest-bazel

Repository files navigation

Neotest Bazel

A neotest adapter for Bazel, which aims to be flexible enough for use in large Bazel monorepos.

image

Table of Contents

FAQs

How does this differ from sluongng/neotest-bazel?

My primary goal is to make this plugin usable in large monorepos, which may otherwise struggle with neotest's discovery while still being flexible enough to enable eager discovery in smaller projects. In terms of current functionality, sluongng/neotest-bazel will currently run tests from within the language test file (if that language is supported), while this project will only run tests from the BUILD file which defines the corresponding target.

Current Known Issues

  • Tests cannot be run from the language test file, only the BUILD file which defines the target.
  • Within BUILD files, test target location is limited to the row and column of the opening parenthesis (as reported by bazel query) rather than encompassing the entire location.

Development

Run tests

Running tests requires either

to be installed1.

You can then run:

luarocks test --local
# or
busted

Or if you want to run a single test file:

luarocks test spec/path_to_file.lua --local
# or
busted spec/path_to_file.lua

If you see an error like module 'busted.runner' not found:

eval $(luarocks path --no-bin)

Acknowledgements

Footnotes

  1. The test suite assumes that nlua has been installed using luarocks into ~/.luarocks/bin/.

About

A neotest adapter for running tests via Bazel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages