From 3760d921ed838888237c38c79e84a55f61aa7c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Michal=C3=ADk?= Date: Tue, 27 Feb 2024 20:24:59 +0100 Subject: [PATCH] chore: rename get_prefix to get_test_id --- lua/neotest-go/init.lua | 2 +- lua/neotest-go/utils.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-go/init.lua b/lua/neotest-go/init.lua index ab0b5e3..ea0ea52 100644 --- a/lua/neotest-go/init.lua +++ b/lua/neotest-go/init.lua @@ -164,7 +164,7 @@ function adapter.build_spec(args) local run_flag = {} if position.type == "test" then - run_flag = { "-run", "^" .. utils.get_prefix(args.tree) .. "$" } + run_flag = { "-run", "^" .. utils.get_test_id(args.tree) .. "$" } end local command = vim.tbl_flatten({ diff --git a/lua/neotest-go/utils.lua b/lua/neotest-go/utils.lua index 546844b..c10874a 100644 --- a/lua/neotest-go/utils.lua +++ b/lua/neotest-go/utils.lua @@ -158,7 +158,7 @@ end ---@param tree neotest.Tree ---@return string -function utils.get_prefix(tree) +function utils.get_test_id(tree) local parts = {} -- build test name for potentially deeply nested tests