2

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'?

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
kylehz
  • 39
  • 4

2 Answers2

5

I had the same error (macOS Sierra, fish shell) and solved it by running busted . instead of just busted. Note the period indicating busted should look in the current working directory.

Pieter Jongsma
  • 3,365
  • 3
  • 27
  • 30
2

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.