@flemist/test-variants 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -451,25 +451,27 @@ function w(){
451
451
  return c(this,void 0,void 0,function(){
452
452
  var n,r=this;return l(this,function(s){
453
453
  switch(s.label){case 0:n=function(){
454
- var e,n,s,i,a,u,h;return l(this,function(d){
455
- switch(d.label){case 0:return e=L,n=o(o({},Q),{
454
+ var e,n,s,i,a,u,h,d;return l(this,function(v){
455
+ switch(v.label){case 0:return e=L,n=o(o({},Q),{
456
456
  seed:q
457
- }),s=(V||C)&&Date.now(),V&&s-st>=V&&(console.log(nt),st=s),F&&nt-ot>=F||D&&rt-ct>=D||C&&s-it>=C?(ot=nt,
457
+ }),s=(V||C)&&Date.now(),V&&s-st>=V&&(i="",i+=N?"cycle: ".concat(U,", variant: ").concat(L,"/").concat(G):"variant: ".concat(L),
458
+ i+=", total: ".concat(nt),
459
+ console.log(i),st=s),F&&nt-ot>=F||D&&rt-ct>=D||C&&s-it>=C?(ot=nt,
458
460
  ct=rt,it=s,[4,Y(1)]):[3,2];case 1:
459
- d.sent(),d.label=2;case 2:
461
+ v.sent(),v.label=2;case 2:
460
462
  if(null==J?void 0:J.aborted)return[2,"continue"]
461
- ;if(lt&&!Z.aborted)return[3,10];d.label=3;case 3:
462
- return d.trys.push([3,6,,9]),g(i=t(n,e,Z))?[4,i]:[3,5]
463
- ;case 4:i=d.sent(),d.label=5;case 5:
464
- return i?(a=i.iterationsAsync,u=i.iterationsSync,
465
- rt+=a,nt+=u+a,[3,9]):(et=!0,H.abort(),
463
+ ;if(lt&&!Z.aborted)return[3,10];v.label=3;case 3:
464
+ return v.trys.push([3,6,,9]),g(a=t(n,e,Z))?[4,a]:[3,5]
465
+ ;case 4:a=v.sent(),v.label=5;case 5:
466
+ return a?(u=a.iterationsAsync,h=a.iterationsSync,
467
+ rt+=u,nt+=h+u,[3,9]):(et=!0,H.abort(),
466
468
  [2,"continue"]);case 6:
467
- return h=d.sent(),E?[4,f(n,E,j.argsToJson)]:[3,8]
468
- ;case 7:d.sent(),d.label=8;case 8:if(!N)throw h
469
- ;return B={error:h,args:n,index:e},et=!1,[3,9]
469
+ return d=v.sent(),E?[4,f(n,E,j.argsToJson)]:[3,8]
470
+ ;case 7:v.sent(),v.label=8;case 8:if(!N)throw d
471
+ ;return B={error:d,args:n,index:e},et=!1,[3,9]
470
472
  ;case 9:return[3,13];case 10:
471
473
  return lt.hold(1)?[3,12]:[4,lt.holdWait(1)]
472
- ;case 11:d.sent(),d.label=12;case 12:
474
+ ;case 11:v.sent(),v.label=12;case 12:
473
475
  c(r,void 0,void 0,function(){var r,s,i,o
474
476
  ;return l(this,function(c){switch(c.label){case 0:
475
477
  return c.trys.push([0,3,6,7]),
@@ -481,7 +483,7 @@ return o=c.sent(),E?[4,f(n,E,j.argsToJson)]:[3,5]
481
483
  ;case 4:c.sent(),c.label=5;case 5:if(!N)throw o
482
484
  ;return B={error:o,args:n,index:e},et=!1,[3,7]
483
485
  ;case 6:return lt.release(1),[7];case 7:return[2]}
484
- })}),d.label=13;case 13:return[2]}})},s.label=1
486
+ })}),v.label=13;case 13:return[2]}})},s.label=1
485
487
  ;case 1:
486
488
  return(null==J?void 0:J.aborted)||!et&&!function(){
487
489
  for(;;){
@@ -146,7 +146,15 @@ function testVariantsRun(testRun, variants, options = {}) {
146
146
  const now = (logInterval || GC_Interval) && Date.now();
147
147
  if (logInterval && now - prevLogTime >= logInterval) {
148
148
  // the log is required to prevent the karma browserNoActivityTimeout
149
- console.log(iterations);
149
+ let log = '';
150
+ if (findBestError) {
151
+ log += `cycle: ${cycleIndex}, variant: ${index}/${limitVariantsCount}`;
152
+ }
153
+ else {
154
+ log += `variant: ${index}`;
155
+ }
156
+ log += `, total: ${iterations}`;
157
+ console.log(log);
150
158
  prevLogTime = now;
151
159
  }
152
160
  if (GC_Iterations && iterations - prevGC_Iterations >= GC_Iterations
@@ -122,7 +122,15 @@ function testVariantsRun(testRun, variants, options = {}) {
122
122
  const now = (logInterval || GC_Interval) && Date.now();
123
123
  if (logInterval && now - prevLogTime >= logInterval) {
124
124
  // the log is required to prevent the karma browserNoActivityTimeout
125
- console.log(iterations);
125
+ let log = '';
126
+ if (findBestError) {
127
+ log += `cycle: ${cycleIndex}, variant: ${index}/${limitVariantsCount}`;
128
+ }
129
+ else {
130
+ log += `variant: ${index}`;
131
+ }
132
+ log += `, total: ${iterations}`;
133
+ console.log(log);
126
134
  prevLogTime = now;
127
135
  }
128
136
  if (GC_Iterations && iterations - prevGC_Iterations >= GC_Iterations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flemist/test-variants",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Runs a test function with all possible combinations of its parameters.",
5
5
  "main": "dist/lib/index.cjs",
6
6
  "module": "dist/lib/index.mjs",