File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ files = {
5353 globals = {
5454 " describe" ,
5555 " it" ,
56+ " pending" ,
5657 " before_each" ,
5758 " after_each" ,
5859 },
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ exports.tests.add_globals = function()
3333 a .describe = exports .tests .describe
3434 -- must prefix with a or stack overflow
3535 a .it = exports .tests .it
36+ a .pending = exports .tests .pending
3637 a .before_each = exports .tests .before_each
3738 a .after_each = exports .tests .after_each
3839end
@@ -46,8 +47,9 @@ exports.tests.add_to_env = function()
4647 env .a .describe = exports .tests .describe
4748 -- must prefix with a or stack overflow
4849 env .a .it = exports .tests .it
49- a .before_each = exports .tests .before_each
50- a .after_each = exports .tests .after_each
50+ env .a .pending = exports .tests .pending
51+ env .a .before_each = exports .tests .before_each
52+ env .a .after_each = exports .tests .after_each
5153
5254 setfenv (2 , env )
5355end
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ M.it = function(s, async_func)
1010 it (s , util .will_block (async_func , tonumber (vim .env .PLENARY_TEST_TIMEOUT )))
1111end
1212
13+ M .pending = function (async_func )
14+ pending (async_func )
15+ end
16+
1317M .before_each = function (async_func )
1418 before_each (util .will_block (async_func ))
1519end
Original file line number Diff line number Diff line change @@ -50,3 +50,9 @@ a.describe("a.after_each", function()
5050 assert .are .same (counter , 4 )
5151 end )
5252end )
53+
54+ a .describe (" a.pending" , function ()
55+ a .pending (" This test is disabled" , function ()
56+ assert (false , " Should not run" )
57+ end )
58+ end )
You can’t perform that action at this time.
0 commit comments