plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

feat(busted): option to filter tests to run by pattern [wip]

Open joeveiga opened this issue 2 years ago • 2 comments

This is a step towards being able to run individual tests. See #343. I'm just starting with lua and vim plugin development as well so, be gentle 😆.

Kapture 2022-06-12 at 16 01 28

Todo

  • [ ] Document the changes.
  • [ ] Fix vim command (not sure how to parse the options correctly or serialize a lua table to be passed down, please see TODOs in the code).

joeveiga avatar Jun 12 '22 20:06 joeveiga

Overall Looks good. Thanks :)

Conni2461 avatar Jun 12 '22 20:06 Conni2461

Overall Looks good. Thanks :)

Thanks @Conni2461! Could you perhaps help me out with some guidance on how to fix the PlenaryBustedDirectory command? I tried modifying the Makefile when testing this to include the filter option in the second argument, but that breaks here: https://github.com/nvim-lua/plenary.nvim/blob/9f033d1469312c51521cf27c64925904bd6400b7/lua/plenary/test_harness.lua#L33 It seems we're doing some hacking there to parse the second argument as a lua table manually? But adding a second field to the table causes an error. I'm guessing it doesn't like the comma in {minimal_init = 'tests/minimal_init.lua', filter = 'test'}?

EDIT: found this #284

joeveiga avatar Jun 12 '22 20:06 joeveiga