Search code examples
lualuarockslua-busted

busted No test files found matching Lua pattern: spec


my directory

the contents of the file 'hhh.lua' is the same as file 'btest_spec.lua' (see my directory)

when I run 'busted' (just use commond 'busted') ,it return an error:

0 successes / 0 failures / 1 error / 0 pending : 0.00003 seconds
Error → No test files found matching Lua pattern: _spec

when I run 'busted btest_spec.lua' , it success and return :

●●
2 successes / 0 failures / 0 errors / 0 pending : 0.003049 seconds

when I run 'busted *', it success and return :

●●●●
4 successes / 0 failures / 0 errors / 0 pending : 0.006815 seconds

so ,why busted fail to find file 'btest_spec.lua' when I run 'busted'?


Solution

  • This is due to a break in the dependency "penlight", which busted relies on.

    See here - https://github.com/Olivine-Labs/busted/issues/528

    The fixed version of penlight (1.4.1) is now on luarocks, which should fix your issue if you update busted.