Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on 'test.assert': Attempt to call a table value (field 'assert') #9

Open
PhilipRoman opened this issue Aug 17, 2019 · 1 comment

Comments

@PhilipRoman
Copy link

PhilipRoman commented Aug 17, 2019

Steps to reproduce:

require 'luarocks.loader'
local test = require 'u-test'

test.hello_world = function()
  test.assert(true)
end

Output:

[----------]
[ RUN      ] hello_world
test.lua:6: attempt to call a table value (field 'assert')
[      FAIL] hello_world 0 sec

Versions

u-test 1.1.0-0
Lua 5.3.3
luarocks 3.0.4

Additional info

Turns out that

type(test.assert) == "table"
getmetatable(test.assert).__call == nil
@sobjornstad
Copy link

Still not working for me a year later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants