Skip to content

busted test stdlib extension is not working #91

@hramrach

Description

@hramrach

With luacheck 1.0.0 I get

  • luacheck --std min --config tests/lua/.luacheckrc --codes tests/lua/command_log_spec.lua
    Checking tests/lua/command_log_spec.lua 31 warnings

    tests/lua/command_log_spec.lua:3:1: (W113) accessing undefined variable describe
    tests/lua/command_log_spec.lua:4:2: (W113) accessing undefined variable it
    tests/lua/command_log_spec.lua:5:3: (W143) accessing undefined field has_no.error of global assert
    tests/lua/command_log_spec.lua:6:3: (W143) accessing undefined field has_no.error of global assert
    tests/lua/command_log_spec.lua:8:2: (W113) accessing undefined variable it
    tests/lua/command_log_spec.lua:9:3: (W143) accessing undefined field has.error of global assert
    tests/lua/command_log_spec.lua:10:3: (W143) accessing undefined field has.error of global assert
    tests/lua/command_log_spec.lua:12:2: (W113) accessing undefined variable it
    tests/lua/command_log_spec.lua:13:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:14:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:15:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:16:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:18:2: (W113) accessing undefined variable it
    tests/lua/command_log_spec.lua:19:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:20:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:22:2: (W113) accessing undefined variable it
    tests/lua/command_log_spec.lua:24:13: (W113) accessing undefined variable spy
    tests/lua/command_log_spec.lua:25:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:26:3: (W143) accessing undefined field spy of global assert
    tests/lua/command_log_spec.lua:26:33: (W113) accessing undefined variable match
    tests/lua/command_log_spec.lua:28:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:29:3: (W143) accessing undefined field spy of global assert
    tests/lua/command_log_spec.lua:29:33: (W113) accessing undefined variable match
    tests/lua/command_log_spec.lua:31:3: (W143) accessing undefined field has.error of global assert
    tests/lua/command_log_spec.lua:32:3: (W143) accessing undefined field spy of global assert
    tests/lua/command_log_spec.lua:32:33: (W113) accessing undefined variable match
    tests/lua/command_log_spec.lua:34:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:35:3: (W143) accessing undefined field spy of global assert
    tests/lua/command_log_spec.lua:36:3: (W143) accessing undefined field equal of global assert
    tests/lua/command_log_spec.lua:37:3: (W143) accessing undefined field spy of global assert
    tests/lua/command_log_spec.lua:37:33: (W113) accessing undefined variable match

This is in conflict with what the documentation says:

files["/tests//*_spec.lua"].std = "+busted"

That is test files should recognize the busted test environment globals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions