File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ M.setup = function(args)
21
21
end
22
22
23
23
M .hello = function ()
24
- module .my_first_function ()
24
+ return module .my_first_function (M . config . opt )
25
25
end
26
26
27
27
return M
Original file line number Diff line number Diff line change 2
2
local M = {}
3
3
4
4
--- @return string
5
- M .my_first_function = function ()
6
- return " hello world! "
5
+ M .my_first_function = function (greeting )
6
+ return greeting
7
7
end
8
8
9
9
return M
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ local plugin = require("plugin_name")
2
2
3
3
describe (" setup" , function ()
4
4
it (" works with default" , function ()
5
- assert (" my first function with param = Hello!" , plugin . hello () )
5
+ assert (plugin . hello () == " Hello! " , " my first function with param = Hello!" )
6
6
end )
7
7
8
8
it (" works with custom var" , function ()
9
9
plugin .setup ({ opt = " custom" })
10
- assert (" my first function with param = custom" , plugin . hello () )
10
+ assert (plugin . hello () == " custom " , " my first function with param = custom" )
11
11
end )
12
12
end )
You can’t perform that action at this time.
0 commit comments