codi-test-framework
Advanced tools
Comparing version 1.0.20 to 1.0.21
{ | ||
"name": "codi-test-framework", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "A simple test framework for JavaScript", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -15,3 +15,3 @@ import assertions from "./assertions/_assertions.js"; | ||
const version = "v1.0.20"; | ||
const version = "v1.0.21"; | ||
@@ -18,0 +18,0 @@ // Create the codi object to hold all exports |
@@ -176,6 +176,5 @@ import chalk from "chalk"; | ||
// In TestState.js | ||
function hasFailingTests(suite) { | ||
// Base case: check current suite's tests | ||
if (suite.tests?.iterable?.some((test) => test.status === "failed")) { | ||
if (suite.tests?.some((test) => test.status === "failed")) { | ||
return true; | ||
@@ -198,3 +197,3 @@ } | ||
// Print suite name | ||
if (suite.children.length > 0 || results.length > 0 || hasFailingChildren) { | ||
if ((suite.children.length > 0 && hasFailingChildren) || results.length > 0) { | ||
console.log("\n" + indentation + chalk.yellow(chalk.bold(suite.name))); | ||
@@ -201,0 +200,0 @@ } |
43566
1098