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

Make sure IDs can correlate

This commit is contained in:
Michael Utz 2022-11-16 10:40:10 +03:00
parent eb1597c9bc
commit eba8cf0c07

View file

@ -9,7 +9,7 @@ local separator = "::"
---@return string
M.make_test_id = function(position)
-- Treesitter starts line numbers from 0 so we add 1
local id = position.path .. separator .. (tonumber(position.range[1]) + 1)
local id = position.path .. separator .. position.name
logger.info("Path to test file:", { position.path })
logger.info("Treesitter id:", { id })
@ -57,7 +57,7 @@ end
local function make_outputs(test, output_file)
local test_attr = test["_attr"] or test[1]["_attr"]
local test_id = test_attr.file .. separator .. test_attr.line
local test_id = test_attr.file .. separator .. test_attr.name
logger.info("Pest id:", { test_id })
local test_output = {