mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
feat(ts)(lua): support for async plenary tests
This commit is contained in:
parent
d953c28f81
commit
dd35fd75c4
3 changed files with 58 additions and 4 deletions
|
@ -25,4 +25,14 @@
|
|||
(function_definition) @type)
|
||||
) @start
|
||||
|
||||
(function_call
|
||||
name: (dot_index_expression
|
||||
table: (identifier) @tbl (#match? @tbl "^a")
|
||||
field: (identifier) @method @name (#any-of? @method "describe" "it" "before_each" "after_each")
|
||||
)
|
||||
arguments: (arguments
|
||||
(string)? @name
|
||||
(function_definition) @type)
|
||||
) @start
|
||||
|
||||
(function_definition) @type
|
||||
|
|
|
@ -117,20 +117,58 @@ describe("treesitter lua", function()
|
|||
},
|
||||
{
|
||||
kind = "Function",
|
||||
name = "M:fn_7",
|
||||
name = "describe UnitTest",
|
||||
level = 0,
|
||||
lnum = 35,
|
||||
col = 0,
|
||||
end_lnum = 35,
|
||||
end_lnum = 39,
|
||||
end_col = 4,
|
||||
children = {
|
||||
{
|
||||
kind = "Function",
|
||||
name = "before_each",
|
||||
level = 1,
|
||||
lnum = 36,
|
||||
col = 2,
|
||||
end_lnum = 36,
|
||||
end_col = 31,
|
||||
},
|
||||
{
|
||||
kind = "Function",
|
||||
name = "after_each",
|
||||
level = 1,
|
||||
lnum = 37,
|
||||
col = 2,
|
||||
end_lnum = 37,
|
||||
end_col = 30,
|
||||
},
|
||||
{
|
||||
kind = "Function",
|
||||
name = "it describes the test",
|
||||
level = 1,
|
||||
lnum = 38,
|
||||
col = 2,
|
||||
end_lnum = 38,
|
||||
end_col = 44,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
kind = "Function",
|
||||
name = "M:fn_7",
|
||||
level = 0,
|
||||
lnum = 41,
|
||||
col = 0,
|
||||
end_lnum = 41,
|
||||
end_col = 21,
|
||||
},
|
||||
{
|
||||
kind = "Function",
|
||||
name = 'M["fn_8"]',
|
||||
level = 0,
|
||||
lnum = 37,
|
||||
lnum = 43,
|
||||
col = 0,
|
||||
end_lnum = 37,
|
||||
end_lnum = 43,
|
||||
end_col = 26,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -32,6 +32,12 @@ describe("UnitTest", function()
|
|||
it("describes the test", function() end)
|
||||
end)
|
||||
|
||||
a.describe("UnitTest", function()
|
||||
a.before_each(function() end)
|
||||
a.after_each(function() end)
|
||||
a.it("describes the test", function() end)
|
||||
end)
|
||||
|
||||
function M:fn_7() end
|
||||
|
||||
M["fn_8"] = function() end
|
||||
|
|
Loading…
Reference in a new issue