From 46cdb550c89d346a2b5cd5f4af6846584c584553 Mon Sep 17 00:00:00 2001 From: Michael Utz Date: Thu, 17 Nov 2022 01:35:21 +0300 Subject: [PATCH] Add support for skipped files --- lua/neotest-pest/utils.lua | 5 +++++ specs/utils_spec.lua | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/neotest-pest/utils.lua b/lua/neotest-pest/utils.lua index 971a456..d07e971 100644 --- a/lua/neotest-pest/utils.lua +++ b/lua/neotest-pest/utils.lua @@ -99,6 +99,11 @@ local function make_outputs(test, output_file) end end + if test['skipped'] then + test_output.status = "skipped" + test_output.short = make_short_output(test_attr, "skipped") + end + logger.debug("test_output:", test_output) return test_id, test_output diff --git a/specs/utils_spec.lua b/specs/utils_spec.lua index c3ac1f2..84a4757 100644 --- a/specs/utils_spec.lua +++ b/specs/utils_spec.lua @@ -374,7 +374,7 @@ describe("get_test_results", function() class = "Tests\\Feature\\UserTest", classname = "Tests.Feature.UserTest", file = "/Users/michaelutz/Code/neotest-pest/tests/Feature/UserTest.php", - name = "tellName", + name = "skipped", time = "0.001544" }, skipped = {} @@ -385,10 +385,10 @@ describe("get_test_results", function() } local expected = { - ["/Users/michaelutz/Code/neotest-pest/tests/Feature/UserTest.php::tellName"] = { + ["/Users/michaelutz/Code/neotest-pest/tests/Feature/UserTest.php::skipped"] = { output_file = output_file, - short = "PASSED | tellName", - status = "passed" + short = "SKIPPED | skipped", + status = "skipped" } }