From 51217960f849c14db89f0ccf9aee7a9297fe7fff Mon Sep 17 00:00:00 2001 From: V13Axel Date: Mon, 19 Feb 2024 14:39:06 -0500 Subject: [PATCH] Fix breakage of tests with names containing 'it' --- lua/neotest-pest/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/neotest-pest/utils.lua b/lua/neotest-pest/utils.lua index f649021..2030a59 100644 --- a/lua/neotest-pest/utils.lua +++ b/lua/neotest-pest/utils.lua @@ -67,7 +67,7 @@ end local function make_outputs(test, output_file) logger.debug("Pre-output test:", test) local test_attr = test["_attr"] or test[1]["_attr"] - local name = string.gsub(test_attr.name, "it (.*)", "%1") + local name = string.gsub(test_attr.name, "^it (.*)", "%1") -- Difference to neotest-phpunit as of PHPUnit 10: -- Pest's test IDs are in the format "path/to/test/file::test name"