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
+
1
3
local dirname = function (p )
2
4
return vim .fn .fnamemodify (p , " :h" )
3
5
end
@@ -172,12 +174,12 @@ local run_each = function(tbl)
172
174
end
173
175
174
176
local matches_filter = function (desc )
175
- if not _PlenaryBustedOpts .filter then
177
+ if not busted_opts .filter then
176
178
return true
177
179
end
178
180
179
181
local desc_stack = table.concat (current_description , " " ) .. desc
180
- return desc_stack :match (_PlenaryBustedOpts .filter )
182
+ return desc_stack :match (busted_opts .filter )
181
183
end
182
184
183
185
mod .it = function (desc , func )
@@ -223,7 +225,6 @@ mod.pending = function(desc, func)
223
225
end
224
226
225
227
_PlenaryBustedOldAssert = _PlenaryBustedOldAssert or assert
226
- _PlenaryBustedOpts = {} -- TODO: check if this should be here?
227
228
228
229
describe = mod .describe
229
230
it = mod .it
@@ -234,7 +235,7 @@ clear = mod.clear
234
235
assert = require " luassert"
235
236
236
237
mod .run = function (file , opts )
237
- _PlenaryBustedOpts = vim .tbl_deep_extend ( " force " , {}, opts or {} )
238
+ busted_opts = vim .F . if_nil ( opts , {}, opts )
238
239
239
240
print (" \n " .. HEADER )
240
241
print (" Testing: " , file )
You can’t perform that action at this time.
0 commit comments