From dadd8a8546ecad8230f9245e49b394e22627cbbb Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Jan 2026 15:55:25 +0300 Subject: [PATCH] now setups, modifiers, tests and cases starting with '_' will not be run... Signed-off-by: Alex A. Naanou --- package.json | 2 +- test.js | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a1178aa..ba2010b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-test", - "version": "1.6.5", + "version": "1.6.6", "description": "experimental test runner....", "main": "test.js", "bin": { diff --git a/test.js b/test.js index e3f6db1..af91df6 100644 --- a/test.js +++ b/test.js @@ -488,15 +488,17 @@ function(spec, chain, mod_chain_length=1){ object.deepKeys(tests) .filter(function(t, i, l){ return typeof(tests[t]) == 'function' - // skip blank tests if we have other tests unless - // explicitly specified... - && ((t == '-' - && chain.test != t - && l.length > 1) ? - false - : (chain == '**' - || chain.test == '*' - || chain.test == t) ) }) + // skip methods starting with '_'... + && t[0] != '_' + // skip blank tests if we have other tests unless + // explicitly specified... + && ((t == '-' + && chain.test != t + && l.length > 1) ? + false + : (chain == '**' + || chain.test == '*' + || chain.test == t) ) }) var mod_queue = [] if(mod_chain_length > 0){ if(chain.mod instanceof Array){ @@ -505,6 +507,8 @@ function(spec, chain, mod_chain_length=1){ mod_queue = object.deepKeys(modifiers) .filter(function(m){ return typeof(modifiers[m]) == 'function' + // skip methods starting with '_'... + && t[0] != '_' && (chain == '**' || chain.mod == '*' || chain.mod == m) }) @@ -523,6 +527,8 @@ function(spec, chain, mod_chain_length=1){ var setup_queue = object.deepKeys(setups) .filter(function(s){ return typeof(setups[s]) == 'function' + // skip methods starting with '_'... + && t[0] != '_' && (chain == '**' || chain.setup == '*' || chain.setup == s) }) @@ -549,6 +555,8 @@ function(spec, chain, mod_chain_length=1){ Object.keys(cases) .filter(function(s){ return typeof(cases[s]) == 'function' + // skip methods starting with '_'... + && t[0] != '_' && (chain == '**' || chain.setup == '*' || chain.setup == s) })