@flemist/test-variants 0.0.11 → 0.0.12

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.
@@ -1,30 +1,30 @@
1
1
  !function(e){"use strict"
2
2
  ;e.createTestVariants=function(e){
3
- return function(n){return function(t){
4
- var o=void 0===t?{}:t,r=o.pauseInterval,u=void 0===r?1e3:r,a=o.pauseTime,i=void 0===a?10:a,f=o.logInterval,c=void 0===f?1e4:f,v=o.logCompleted,l=void 0===v||v,s=Object.keys(n),p=Object.values(n),y=s.length,g={}
5
- ;function h(e){var n=p[e]
6
- ;return"function"==typeof n&&(n=n(g)),n}
3
+ return function(t){return function(n){
4
+ var o=void 0===n?{}:n,r=o.pauseInterval,u=void 0===r?1e3:r,a=o.pauseTime,i=void 0===a?10:a,f=o.logInterval,c=void 0===f?1e4:f,v=o.logCompleted,l=void 0===v||v,s=Object.keys(t),p=Object.values(t),y=s.length,g={}
5
+ ;function h(e){var t=p[e]
6
+ ;return"function"==typeof t&&(t=t(g)),t}
7
7
  for(var b=[],d=[],m=0;m<y;m++)b[m]=-1,d[m]=[]
8
- ;function w(){for(var e=y-1;e>=0;e--){var n=b[e]+1
9
- ;if(n<d[e].length){
10
- for(b[e]=n,g[s[e]]=d[e][n],e++;e<y;e++){var t=h(e)
11
- ;if(0===t.length)break;b[e]=0,d[e]=t,g[s[e]]=t[0]}
8
+ ;function w(){for(var e=y-1;e>=0;e--){var t=b[e]+1
9
+ ;if(t<d[e].length){
10
+ for(b[e]=t,g[s[e]]=d[e][t],e++;e<y;e++){var n=h(e)
11
+ ;if(0===n.length)break;b[e]=0,d[e]=n,g[s[e]]=n[0]}
12
12
  if(e>=y)return!0}}return!1}d[0]=h(0)
13
13
  ;var D=0,j=!1,O=0;function T(e){
14
- console.error(JSON.stringify(g,null,2)),console.error(e)
15
- ;var n=Date.now()
16
- ;throw Date.now()-n>50&&O<5&&(console.log("DEBUG ITERATION: "+O),
17
- j=!0,P(0),O++),e}var I=Date.now();function P(n){
18
- var t=(c||u)&&Date.now()
19
- ;t&&t-I>=c&&(console.log(D),I=t),D+="number"==typeof n?n:1
20
- ;for(var o=u&&t,r=function(){try{var n=e(g)
21
- ;if("object"==typeof n&&n&&"function"==typeof n.then)return{
22
- value:n.catch(T).then(P)}
14
+ console.error(JSON.stringify(g,null,2))
15
+ ;var t=Date.now()
16
+ ;throw Date.now()-t>50&&O<5&&(console.log("DEBUG ITERATION: "+O),
17
+ j=!0,P(0),O++),e}var I=Date.now();function P(t){
18
+ var n=(c||u)&&Date.now()
19
+ ;n&&n-I>=c&&(console.log(D),I=n),D+="number"==typeof t?t:1
20
+ ;for(var o=u&&n,r=function(){try{var t=e(g)
21
+ ;if("object"==typeof t&&t&&"function"==typeof t.then)return{
22
+ value:t.catch(T).then(P)}
23
23
  ;if(o&&Date.now()-o>=u)return{
24
24
  value:(i?new Promise((function(e){
25
- setTimeout((function(){e(n)}),i)
26
- })):Promise.resolve(n)).then(P)}
27
- ;D+="number"==typeof n?n:1}catch(e){T(e)}
25
+ setTimeout((function(){e(t)}),i)
26
+ })):Promise.resolve(t)).then(P)}
27
+ ;D+="number"==typeof t?t:1}catch(e){T(e)}
28
28
  };j||w();){var a=r()
29
29
  ;if("object"==typeof a)return a.value}
30
30
  return l&&console.log("variants: "+D),D}
@@ -51,7 +51,6 @@ function createTestVariants(test) {
51
51
  let debugIteration = 0;
52
52
  function onError(err) {
53
53
  console.error(JSON.stringify(variantArgs, null, 2));
54
- console.error(err); // required to show intelliJ idea assertion difference
55
54
  // rerun failed variant 5 times for debug
56
55
  const time0 = Date.now();
57
56
  // eslint-disable-next-line no-debugger
@@ -47,7 +47,6 @@ function createTestVariants(test) {
47
47
  let debugIteration = 0;
48
48
  function onError(err) {
49
49
  console.error(JSON.stringify(variantArgs, null, 2));
50
- console.error(err); // required to show intelliJ idea assertion difference
51
50
  // rerun failed variant 5 times for debug
52
51
  const time0 = Date.now();
53
52
  // eslint-disable-next-line no-debugger
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flemist/test-variants",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
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",