【问题标题】:busted No test files found matching Lua pattern: spec没有找到匹配 Lua 模式的测试文件:spec
【发布时间】:2016-12-13 02:37:58
【问题描述】:

my directory

文件“hhh.lua”的内容与文件“btest_spec.lua”相同(见我的目录)

当我运行 'busted' (just use commond 'busted') 时,它返回一个错误:

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

当我运行 'busted btest_spec.lua' 时,它成功并返回:

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

当我运行“busted *”时,它成功并返回:

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

那么,为什么 busted 在我运行 'busted' 时找不到文件 'btest_spec.lua'?

【问题讨论】:

    标签: lua luarocks lua-busted


    【解决方案1】:

    我遇到了同样的错误(macOS Sierra,fish shell)并通过运行 busted . 而不是仅仅运行 busted 来解决它。注意表示被破坏的句点应该在当前工作目录中。

    【讨论】:

    • 还修复了 Ubuntu (gnome-terminal) 上的问题。
    • 这是正确答案!我在 OSX 中使用 zsh 安装了 1.7.0-1 并且遇到了同样的错误。以$ busted . 运行它。
    【解决方案2】:

    这是由于 busted 依赖的依赖“penlight”中断。

    请看这里 - https://github.com/Olivine-Labs/busted/issues/528

    penlight (1.4.1) 的固定版本现在在 luarocks 上,如果你更新 busted,它应该可以解决你的问题。

    【讨论】:

    • 我安装了 penlight 1.5.4-1,所以这一定是另一个问题。
    猜你喜欢
    • 2016-03-07
    • 2018-04-12
    • 1970-01-01
    • 2013-01-19
    • 2018-05-22
    • 2021-10-26
    • 2019-03-29
    • 1970-01-01
    • 2019-01-14
    相关资源
    最近更新 更多