added total test count to -l...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-08-17 03:12:12 +03:00
parent f430f27e1a
commit 10f1923ebf
2 changed files with 9 additions and 6 deletions

View File

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

13
test.js
View File

@ -540,9 +540,10 @@ argv.Parser({
.flat() } .flat() }
// XXX should this account for pass-through elements... // XXX should this account for pass-through elements...
var len = function(s){ var len = function(s){
return ''+ (object.parentOf(Merged, s) ? return (object.parentOf(Merged, s) ?
s.size s.size
: Object.keys(s).length) } : Object.keys(s).length) }
var a, b, c, d
console.log( console.log(
object.text` object.text`
Tests run by %s can be of the following forms: Tests run by %s can be of the following forms:
@ -551,25 +552,27 @@ argv.Parser({
<setup>:<test> <setup>:<test>
<setup>:<modifier>:<test> <setup>:<modifier>:<test>
Setups (${ len(this.setups) }): Setups (${ (a = len(this.setups)) +'' }):
${ keys(this.setups).join('\n\ ${ keys(this.setups).join('\n\
') } ') }
Modifiers (${ len(this.modifiers) - 1 + '' }): Modifiers (${ ((b = len(this.modifiers)) - 1) +'' }):
${ keys(this.modifiers) ${ keys(this.modifiers)
.filter(function(e){ return e != '-' }) .filter(function(e){ return e != '-' })
.join('\n\ .join('\n\
') } ') }
Tests (${ len(this.tests) - 1 + ''}): Tests (${ (c = len(this.tests) - 1) +''}):
${ keys(this.tests) ${ keys(this.tests)
.filter(function(e){ return e != '-' }) .filter(function(e){ return e != '-' })
.join('\n\ .join('\n\
') } ') }
Standalone test cases (${ len(this.cases) }): Standalone test cases (${ (d = len(this.cases)) +'' }):
${ keys(this.cases).join('\n\ ${ keys(this.cases).join('\n\
') } ') }
Total number of tests: ${ ((a * b * (c || 1)) + d) +'' }
`, this.scriptName) `, this.scriptName)
process.exit() }}, process.exit() }},