From 10588810248f99d4798ca24c278b52a98cdf3fa3 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 27 Jul 2024 23:49:42 +0100 Subject: [PATCH] Core: Rename internal `parentSuite` variable to `parentReport` "module" and "suite" are mostly interchangable terms. "module" is the object created by createModule(). Let's use "report" for the SuiteReport object. --- src/core/module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/module.js b/src/core/module.js index 0b34dcbde..e195eebe9 100644 --- a/src/core/module.js +++ b/src/core/module.js @@ -15,8 +15,8 @@ function isParentModuleInQueue () { function createModule (name, testEnvironment, modifiers) { const parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null; + const parentReport = parentModule ? parentModule.suiteReport : runSuite; const moduleName = parentModule !== null ? [parentModule.name, name].join(' > ') : name; - const parentSuite = parentModule ? parentModule.suiteReport : runSuite; const skip = (parentModule !== null && parentModule.skip) || modifiers.skip; const todo = (parentModule !== null && parentModule.todo) || modifiers.todo; @@ -42,7 +42,7 @@ function createModule (name, testEnvironment, modifiers) { testsRun: 0, testsIgnored: 0, childModules: [], - suiteReport: new SuiteReport(name, parentSuite), + suiteReport: new SuiteReport(name, parentReport), // Initialised by test.js when the module start executing, // i.e. before the first test in this module (or a child).