summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/plugins/node/test.lua6
-rw-r--r--test/type_inference/init.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/plugins/node/test.lua b/test/plugins/node/test.lua
index 15e4d16c..9b69935f 100644
--- a/test/plugins/node/test.lua
+++ b/test/plugins/node/test.lua
@@ -30,10 +30,10 @@ local function TestPlugin(script)
---@field b string
]]
---@param checker fun(state:parser.state)
- return function (plugin, checker)
+ return function (interfaces, checker)
files.open(TESTURI)
files.setText(TESTURI, prefix .. script, true)
- scope.getScope(TESTURI):set('pluginInterfaces', plugin)
+ scope.getScope(TESTURI):set('pluginInterfaces', interfaces)
local state = files.getState(TESTURI)
assert(state)
checker(state)
@@ -45,7 +45,7 @@ TestPlugin [[
local function t(a)
a.components:test()
end
-]](myplugin, function (state)
+]]({ myplugin }, function (state)
guide.eachSourceType(state.ast, 'local', function (src)
if guide.getKeyName(src) == 'a' then
local node = vm.compileNode(src)
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 35900bc3..4eaad03d 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -39,7 +39,7 @@ function TEST(wanted)
if wanted ~= result then
vm.getInfer(source):view(TESTURI)
end
- assert(wanted == result)
+ assert(wanted == result, "Assertion failed! Wanted: " .. tostring(wanted) .. " Got: " .. tostring(result))
files.remove(TESTURI)
end
end