From 34c9f96910932f1c6a4d835c76b15f4c4e265e83 Mon Sep 17 00:00:00 2001 From: Johnathan Estacio Date: Tue, 19 Jul 2022 18:19:28 +0000 Subject: [PATCH] fix: get invocation details from parent --- lib/commands/functions/getTestMetadata.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/commands/functions/getTestMetadata.js b/lib/commands/functions/getTestMetadata.js index 5f4c443..08a2a20 100644 --- a/lib/commands/functions/getTestMetadata.js +++ b/lib/commands/functions/getTestMetadata.js @@ -9,7 +9,8 @@ function getTestMetadata(context) { throw new Error('No "test" in context'); } - const file = test.invocationDetails?.absoluteFile; + const invocationDetails = test.invocationDetails || test.parent?.invocationDetails; + const file = invocationDetails?.absoluteFile; let titles = [test.title]; let parent = test.parent;