1
0
Fork 0
mirror of https://github.com/pnx/neotest-phpunit synced 2026-06-16 03:54:55 +02:00

Fix breakage of tests with names containing 'it'

This commit is contained in:
V13Axel 2024-02-19 14:39:06 -05:00
parent 27f11cc81c
commit 51217960f8

View file

@ -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"