bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2025-12-26 16:24:20 +03:00
parent 5624805518
commit 058db76618
2 changed files with 27 additions and 22 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ig-test",
"version": "1.6.0",
"version": "1.6.1",
"description": "experimental test runner....",
"main": "test.js",
"bin": {

13
test.js
View File

@ -614,9 +614,12 @@ async function(spec, chain, stats, mod_chain_length=1){
var chain_length = chain.length
var setup = chain.shift() || '*'
var test = chain.pop() || '*'
var mod = chain.pop() || '*'
var mod = chain || '*'
mod = chain_length == 2 ?
'as-is'
: mod.length == 1
&& mod[0] == '*' ?
'*'
: mod
// get the tests...
@ -651,10 +654,12 @@ async function(spec, chain, stats, mod_chain_length=1){
false
: (test == '*'
|| test == t) ) })
if(mod_chain_length <= 0){
var mod_queue = []
if(mod_chain_length > 0){
if(mod instanceof Array){
mod_queue = [mod]
} else {
var mod_queue = object.deepKeys(modifiers)
mod_queue = object.deepKeys(modifiers)
.filter(function(m){
return typeof(modifiers[m]) == 'function'
&& (mod == '*' || mod == m) })
@ -669,7 +674,7 @@ async function(spec, chain, stats, mod_chain_length=1){
return mod_queue
.map(function(mm){
return [...m, ...mm] }) })
.flat()] } }
.flat()] } } }
var setup_queue = object.deepKeys(setups)
.filter(function(s){
return typeof(setups[s]) == 'function'