File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1+ local busted_opts
2+
13local dirname = function (p )
24 return vim .fn .fnamemodify (p , " :h" )
35end
@@ -172,12 +174,12 @@ local run_each = function(tbl)
172174end
173175
174176local matches_filter = function (desc )
175- if not _PlenaryBustedOpts .filter then
177+ if not busted_opts .filter then
176178 return true
177179 end
178180
179181 local desc_stack = table.concat (current_description , " " ) .. desc
180- return desc_stack :match (_PlenaryBustedOpts .filter )
182+ return desc_stack :match (busted_opts .filter )
181183end
182184
183185mod .it = function (desc , func )
@@ -223,7 +225,6 @@ mod.pending = function(desc, func)
223225end
224226
225227_PlenaryBustedOldAssert = _PlenaryBustedOldAssert or assert
226- _PlenaryBustedOpts = {} -- TODO: check if this should be here?
227228
228229describe = mod .describe
229230it = mod .it
@@ -234,7 +235,7 @@ clear = mod.clear
234235assert = require " luassert"
235236
236237mod .run = function (file , opts )
237- _PlenaryBustedOpts = vim .tbl_deep_extend ( " force " , {}, opts or {} )
238+ busted_opts = vim .F . if_nil ( opts , {}, opts )
238239
239240 print (" \n " .. HEADER )
240241 print (" Testing: " , file )
You can’t perform that action at this time.
0 commit comments