adrigzr / neotest-mocha

Neotest runner for Mocha test framework
10 stars 9 forks source link

Configure other test patterns than "spec" and "test" #1

Closed MisanthropicBit closed 1 year ago

MisanthropicBit commented 2 years ago

First of all, thanks a lot for this adapter. I was about to make it myself before I found this :)

In some cases, I have projects with test file patterns other than "spec" and "test". It would be great if one could customise this via the config so that the is_test_file function would recognize these files as well. You could either pass a string or a function that does more sophisticated regex stuff or even just override is_test_file like in neotest-python. I'd be happy be submit a PR.

It might make more sense to implement part of this functionality in neotest itself though I cannot find any open issues on it atm.

adrigzr commented 2 years ago

Thanks for the suggestion. Looks like a good addition to me. Feel free to open a PR :)

MisanthropicBit commented 2 years ago

Great :) I'll get started on a PR then. Since neotest-python is an official neotest repo, I'll go with the configurable is_test_file option.