u-test icon indicating copy to clipboard operation
u-test copied to clipboard

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

Open PhilipRoman opened this issue 6 years ago • 1 comments

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

PhilipRoman avatar Aug 17 '19 11:08 PhilipRoman

Still not working for me a year later.

sobjornstad avatar Nov 06 '20 20:11 sobjornstad