@@ -395,6 +395,8 @@ impl MappableCommand {
395395 goto_prev_parameter, "Goto previous parameter",
396396 goto_next_comment, "Goto next comment",
397397 goto_prev_comment, "Goto previous comment",
398+ goto_next_test, "Goto next test",
399+ goto_prev_test, "Goto previous test",
398400 goto_next_paragraph, "Goto next paragraph",
399401 goto_prev_paragraph, "Goto previous paragraph",
400402 dap_launch, "Launch debug target",
@@ -4098,6 +4100,14 @@ fn goto_prev_comment(cx: &mut Context) {
40984100 goto_ts_object_impl(cx, "comment", Direction::Backward)
40994101}
41004102
4103+fn goto_next_test(cx: &mut Context) {
4104+ goto_ts_object_impl(cx, "test", Direction::Forward)
4105+}
4106+
4107+fn goto_prev_test(cx: &mut Context) {
4108+ goto_ts_object_impl(cx, "test", Direction::Backward)
4109+}
4110+
41014111fn select_textobject_around(cx: &mut Context) {
41024112 select_textobject(cx, textobject::TextObject::Around);
41034113}
@@ -4141,6 +4151,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
41414151 'f' => textobject_treesitter("function", range),
41424152 'a' => textobject_treesitter("parameter", range),
41434153 'o' => textobject_treesitter("comment", range),
4154+ 't' => textobject_treesitter("test", range),
41444155 'p' => textobject::textobject_paragraph(text, range, objtype, count),
41454156 'm' => textobject::textobject_surround_closest(text, range, objtype, count),
41464157 // TODO: cancel new ranges if inconsistent surround matches across lines
@@ -4170,6 +4181,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
41704181 ("f", "Function (tree-sitter)"),
41714182 ("a", "Argument/parameter (tree-sitter)"),
41724183 ("o", "Comment (tree-sitter)"),
4184+ ("t", "Test (tree-sitter)"),
41734185 ("m", "Matching delimiter under cursor"),
41744186 (" ", "... or any character acting as a pair"),
41754187 ];