Diff

spec/core_moduleapi_spec.lua @ 13400:786c7707f306

core.moduleapi: Silence strict luacheck warnings in tests
author Kim Alvefur <zash@zash.se>
date Sat, 09 Dec 2023 20:55:26 +0100
parent 8562:a6188f5d5bb5
line wrap: on
line diff
--- a/spec/core_moduleapi_spec.lua	Sat Dec 09 20:36:29 2023 +0100
+++ b/spec/core_moduleapi_spec.lua	Sat Dec 09 20:55:26 2023 +0100
@@ -11,8 +11,8 @@
 
 local module = setmetatable({}, {__index = api});
 local opt = nil;
-function module:log() end
-function module:get_option(name)
+function module.log(_self) end
+function module.get_option(_self, name)
 	if name == "opt" then
 		return opt;
 	else
@@ -20,7 +20,7 @@
 	end
 end
 
-function test_option_value(value, returns)
+local function test_option_value(value, returns)
 	opt = value;
 	assert(module:get_option_number("opt") == returns.number, "number doesn't match");
 	assert(module:get_option_string("opt") == returns.string, "string doesn't match");