clientnode 4.0.1478 → 4.0.1479
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.
- package/dist/compatible/test-helper.js +190 -20
- package/dist/test-helper.d.ts +109 -7
- package/dist/test-helper.js +190 -20
- package/dist/type.d.ts +6 -0
- package/package.json +2 -2
- package/readme.md +12 -7
|
@@ -492,7 +492,7 @@ var object = __webpack_require__(3);
|
|
|
492
492
|
expect(FUNCTION(...parameters)).toStrictEqual(expected)
|
|
493
493
|
)
|
|
494
494
|
*/// region imports
|
|
495
|
-
|
|
495
|
+
function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(_defaults(e,GeneratorFunctionPrototype),_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}};// endregion
|
|
496
496
|
var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW_SYMBOL=Symbol.for("clientnodeTestHelperThrow");var TEST_UNDEFINED_SYMBOL=Symbol.for("clientnodeTestHelperUndefined");/**
|
|
497
497
|
* Tests given result against given expectations. Respects special symbol
|
|
498
498
|
* values.
|
|
@@ -500,7 +500,8 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
500
500
|
* @param expected - Expected result.
|
|
501
501
|
* @param wrap - Indicates whether to wrap with an expect function call.
|
|
502
502
|
* @returns Nothing or a promise resolving to nothing.
|
|
503
|
-
*/var expectExpectedType=function expectExpectedType(givenResult,expected,wrap){if(wrap===void 0){wrap=true}var result=wrap?__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(givenResult):givenResult;if(expected===TEST_DEFINED_SYMBOL)return result.toBeDefined();if(expected===TEST_UNDEFINED_SYMBOL)return result.not.toBeDefined();if(expected===TEST_THROW_SYMBOL)return result.toThrow();return result.toStrictEqual(expected)}
|
|
503
|
+
*/var expectExpectedType=function expectExpectedType(givenResult,expected,wrap){if(wrap===void 0){wrap=true}var result=wrap?__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(givenResult):givenResult;if(expected===TEST_DEFINED_SYMBOL)return result.toBeDefined();if(expected===TEST_UNDEFINED_SYMBOL)return result.not.toBeDefined();if(expected===TEST_THROW_SYMBOL)return result.toThrow();return result.toStrictEqual(expected)};// region testEach
|
|
504
|
+
/**
|
|
504
505
|
* Tests each given test set (expected value follows by various list of
|
|
505
506
|
* function parameters). It respects function signature to raise compile time
|
|
506
507
|
* errors if given test set does not match given function signature.
|
|
@@ -517,7 +518,30 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
517
518
|
* @param callback - Function reference to test.
|
|
518
519
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
519
520
|
* function again.
|
|
520
|
-
*/var testEach=function testEach(functionName,callback){for(var _len3=arguments.length,functionTestTuple=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++){functionTestTuple[_key3-2]=arguments[_key3]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEach.only=function(functionName,callback){for(var _len4=arguments.length,functionTestTuple=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++){functionTestTuple[_key4-2]=arguments[_key4]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEach.skip=function(functionName,callback){for(var _len5=arguments.length,functionTestTuple=new Array(_len5>2?_len5-2:0),_key5=2;_key5<_len5;_key5++){functionTestTuple[_key5-2]=arguments[_key5]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))}
|
|
521
|
+
*/var testEach=function testEach(functionName,callback){for(var _len3=arguments.length,functionTestTuple=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++){functionTestTuple[_key3-2]=arguments[_key3]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEach.only=function(functionName,callback){for(var _len4=arguments.length,functionTestTuple=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++){functionTestTuple[_key4-2]=arguments[_key4]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEach.skip=function(functionName,callback){for(var _len5=arguments.length,functionTestTuple=new Array(_len5>2?_len5-2:0),_key5=2;_key5<_len5;_key5++){functionTestTuple[_key5-2]=arguments[_key5]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
522
|
+
// region testEachAgainstResolvedPromise
|
|
523
|
+
/**
|
|
524
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
525
|
+
* various list of function parameters). It respects function signature to
|
|
526
|
+
* raise compile time errors if given test set does not match given function
|
|
527
|
+
* signature.
|
|
528
|
+
* @param tester - Underling testing function to use.
|
|
529
|
+
* @param functionName - Function description to test.
|
|
530
|
+
* @param callback - Function reference to test.
|
|
531
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
532
|
+
* function again.
|
|
533
|
+
*/var _testEachAgainstResolvedPromise=function _testEachAgainstResolvedPromise(tester,functionName,callback){for(var _len6=arguments.length,functionTestTuple=new Array(_len6>3?_len6-3:0),_key6=3;_key6<_len6;_key6++){functionTestTuple[_key6-3]=arguments[_key6]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(expected){var _len7,parameters,_key7,_args=arguments,_t,_t2;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:for(_len7=_args.length,parameters=new Array(_len7>1?_len7-1:0),_key7=1;_key7<_len7;_key7++){parameters[_key7-1]=_args[_key7]}_t=expectExpectedType;_t2=callback.apply(void 0,parameters);_context.n=1;return expected;case 1:_t(_t2,_context.v);case 2:return _context.a(2)}},_callee)})))};/**
|
|
534
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
535
|
+
* various list of function parameters). It respects function signature to
|
|
536
|
+
* raise compile time errors if given test set does not match given function
|
|
537
|
+
* signature.
|
|
538
|
+
* @param functionName - Function description to test.
|
|
539
|
+
* @param callback - Function reference to test.
|
|
540
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
541
|
+
* function again.
|
|
542
|
+
*/var testEachAgainstResolvedPromise=function testEachAgainstResolvedPromise(functionName,callback){for(var _len8=arguments.length,functionTestTuple=new Array(_len8>2?_len8-2:0),_key8=2;_key8<_len8;_key8++){functionTestTuple[_key8-2]=arguments[_key8]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachAgainstResolvedPromise.only=function(functionName,callback){for(var _len9=arguments.length,functionTestTuple=new Array(_len9>2?_len9-2:0),_key9=2;_key9<_len9;_key9++){functionTestTuple[_key9-2]=arguments[_key9]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachAgainstResolvedPromise.skip=function(functionName,callback){for(var _len0=arguments.length,functionTestTuple=new Array(_len0>2?_len0-2:0),_key0=2;_key0<_len0;_key0++){functionTestTuple[_key0-2]=arguments[_key0]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
543
|
+
// region testEachResolvedPromise
|
|
544
|
+
/**
|
|
521
545
|
* Tests each given test set (expected value follows by various list of
|
|
522
546
|
* function parameters). It respects function signature to raise compile time
|
|
523
547
|
* errors if given test set does not match given function signature.
|
|
@@ -526,7 +550,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
526
550
|
* @param callback - Function reference to test.
|
|
527
551
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
528
552
|
* function again.
|
|
529
|
-
*/var
|
|
553
|
+
*/var _testEachResolvedPromise=function _testEachResolvedPromise(tester,functionName,callback){for(var _len1=arguments.length,functionTestTuple=new Array(_len1>3?_len1-3:0),_key1=3;_key1<_len1;_key1++){functionTestTuple[_key1-3]=arguments[_key1]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),function(expected){for(var _len10=arguments.length,parameters=new Array(_len10>1?_len10-1:0),_key10=1;_key10<_len10;_key10++){parameters[_key10-1]=arguments[_key10]}return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).resolves,expected,false)})};/**
|
|
530
554
|
* Tests each given test set (expected value follows by various list of
|
|
531
555
|
* function parameters). It respects function signature to raise compile time
|
|
532
556
|
* errors if given test set does not match given function signature.
|
|
@@ -534,16 +558,58 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
534
558
|
* @param callback - Function reference to test.
|
|
535
559
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
536
560
|
* function again.
|
|
537
|
-
*/var
|
|
561
|
+
*/var testEachResolvedPromise=function testEachResolvedPromise(functionName,callback){for(var _len11=arguments.length,functionTestTuple=new Array(_len11>2?_len11-2:0),_key11=2;_key11<_len11;_key11++){functionTestTuple[_key11-2]=arguments[_key11]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.only=function(functionName,callback){for(var _len12=arguments.length,functionTestTuple=new Array(_len12>2?_len12-2:0),_key12=2;_key12<_len12;_key12++){functionTestTuple[_key12-2]=arguments[_key12]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.skip=function(functionName,callback){for(var _len13=arguments.length,functionTestTuple=new Array(_len13>2?_len13-2:0),_key13=2;_key13<_len13;_key13++){functionTestTuple[_key13-2]=arguments[_key13]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
562
|
+
// region testEachResolvedPromiseAgainstResolvedPromise
|
|
563
|
+
/**
|
|
564
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
565
|
+
* various list of function parameters). It respects function signature to
|
|
566
|
+
* raise compile time errors if given test set does not match given function
|
|
567
|
+
* signature.
|
|
568
|
+
* @param tester - Underling testing function to use.
|
|
569
|
+
* @param functionName - Function description to test.
|
|
570
|
+
* @param callback - Function reference to test.
|
|
571
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
572
|
+
* function again.
|
|
573
|
+
*/var _testEachResolvedPromiseAgainstResolvedPromise=function _testEachResolvedPromiseAgainstResolvedPromise(tester,functionName,callback){for(var _len14=arguments.length,functionTestTuple=new Array(_len14>3?_len14-3:0),_key14=3;_key14<_len14;_key14++){functionTestTuple[_key14-3]=arguments[_key14]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(expected){var _len15,parameters,_key15,_args2=arguments,_t3,_t4;return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:for(_len15=_args2.length,parameters=new Array(_len15>1?_len15-1:0),_key15=1;_key15<_len15;_key15++){parameters[_key15-1]=_args2[_key15]}_t3=expectExpectedType;_t4=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).resolves;_context2.n=1;return expected;case 1:return _context2.a(2,_t3(_t4,_context2.v,false))}},_callee2)})))};/**
|
|
538
574
|
* Tests each given test set (expected value follows by various list of
|
|
539
575
|
* function parameters). It respects function signature to raise compile time
|
|
540
576
|
* errors if given test set does not match given function signature.
|
|
577
|
+
* @param functionName - Function description to test.
|
|
578
|
+
* @param callback - Function reference to test.
|
|
579
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
580
|
+
* function again.
|
|
581
|
+
*/var testEachResolvedPromiseAgainstResolvedPromise=function testEachResolvedPromiseAgainstResolvedPromise(functionName,callback){for(var _len16=arguments.length,functionTestTuple=new Array(_len16>2?_len16-2:0),_key16=2;_key16<_len16;_key16++){functionTestTuple[_key16-2]=arguments[_key16]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.only=function(functionName,callback){for(var _len17=arguments.length,functionTestTuple=new Array(_len17>2?_len17-2:0),_key17=2;_key17<_len17;_key17++){functionTestTuple[_key17-2]=arguments[_key17]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.skip=function(functionName,callback){for(var _len18=arguments.length,functionTestTuple=new Array(_len18>2?_len18-2:0),_key18=2;_key18<_len18;_key18++){functionTestTuple[_key18-2]=arguments[_key18]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
582
|
+
// region testEachRejectedPromise
|
|
583
|
+
/**
|
|
584
|
+
* Tests each given test set (expected value follows by various list of
|
|
585
|
+
* function parameters). It respects function signature to raise compile time
|
|
586
|
+
* errors if given test set does not match given function signature.
|
|
587
|
+
* @param tester - Underling testing function to use.
|
|
588
|
+
* @param functionName - Function description to test.
|
|
589
|
+
* @param callback - Function reference to test.
|
|
590
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
591
|
+
* function again.
|
|
592
|
+
*/var _testEachRejectedPromise=function _testEachRejectedPromise(tester,functionName,callback){for(var _len19=arguments.length,functionTestTuple=new Array(_len19>3?_len19-3:0),_key19=3;_key19<_len19;_key19++){functionTestTuple[_key19-3]=arguments[_key19]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),function(expected){for(var _len20=arguments.length,parameters=new Array(_len20>1?_len20-1:0),_key20=1;_key20<_len20;_key20++){parameters[_key20-1]=arguments[_key20]}return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).rejects,expected,false)})};/**
|
|
593
|
+
* Tests each given test set (expected value follows by various list of
|
|
594
|
+
* function parameters). It respects function signature to raise compile time
|
|
595
|
+
* errors if given test set does not match given function signature.
|
|
596
|
+
* @param functionName - Function description to test.
|
|
597
|
+
* @param callback - Function reference to test.
|
|
598
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
599
|
+
* function again.
|
|
600
|
+
*/var testEachRejectedPromise=function testEachRejectedPromise(functionName,callback){for(var _len21=arguments.length,functionTestTuple=new Array(_len21>2?_len21-2:0),_key21=2;_key21<_len21;_key21++){functionTestTuple[_key21-2]=arguments[_key21]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromise.only=function(functionName,callback){for(var _len22=arguments.length,functionTestTuple=new Array(_len22>2?_len22-2:0),_key22=2;_key22<_len22;_key22++){functionTestTuple[_key22-2]=arguments[_key22]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromise.skip=function(functionName,callback){for(var _len23=arguments.length,functionTestTuple=new Array(_len23>2?_len23-2:0),_key23=2;_key23<_len23;_key23++){functionTestTuple[_key23-2]=arguments[_key23]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
601
|
+
// region testEachRejectedPromiseAgainstResolvedPromise
|
|
602
|
+
/**
|
|
603
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
604
|
+
* various list of function parameters). It respects function signature to
|
|
605
|
+
* raise compile time errors if given test set does not match given function
|
|
606
|
+
* signature.
|
|
541
607
|
* @param tester - Underling testing function to use.
|
|
542
608
|
* @param functionName - Function description to test.
|
|
543
609
|
* @param callback - Function reference to test.
|
|
544
610
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
545
611
|
* function again.
|
|
546
|
-
*/var
|
|
612
|
+
*/var _testEachRejectedPromiseAgainstResolvedPromise=function _testEachRejectedPromiseAgainstResolvedPromise(tester,functionName,callback){for(var _len24=arguments.length,functionTestTuple=new Array(_len24>3?_len24-3:0),_key24=3;_key24<_len24;_key24++){functionTestTuple[_key24-3]=arguments[_key24]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(expected){var _len25,parameters,_key25,_args3=arguments,_t5,_t6;return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:for(_len25=_args3.length,parameters=new Array(_len25>1?_len25-1:0),_key25=1;_key25<_len25;_key25++){parameters[_key25-1]=_args3[_key25]}_t5=expectExpectedType;_t6=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).rejects;_context3.n=1;return expected;case 1:return _context3.a(2,_t5(_t6,_context3.v,false))}},_callee3)})))};/**
|
|
547
613
|
* Tests each given test set (expected value follows by various list of
|
|
548
614
|
* function parameters). It respects function signature to raise compile time
|
|
549
615
|
* errors if given test set does not match given function signature.
|
|
@@ -551,7 +617,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
551
617
|
* @param callback - Function reference to test.
|
|
552
618
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
553
619
|
* function again.
|
|
554
|
-
*/var
|
|
620
|
+
*/var testEachRejectedPromiseAgainstResolvedPromise=function testEachRejectedPromiseAgainstResolvedPromise(functionName,callback){for(var _len26=arguments.length,functionTestTuple=new Array(_len26>2?_len26-2:0),_key26=2;_key26<_len26;_key26++){functionTestTuple[_key26-2]=arguments[_key26]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromiseAgainstResolvedPromise.only=function(functionName,callback){for(var _len27=arguments.length,functionTestTuple=new Array(_len27>2?_len27-2:0),_key27=2;_key27<_len27;_key27++){functionTestTuple[_key27-2]=arguments[_key27]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromiseAgainstResolvedPromise.skip=function(functionName,callback){for(var _len28=arguments.length,functionTestTuple=new Array(_len28>2?_len28-2:0),_key28=2;_key28<_len28;_key28++){functionTestTuple[_key28-2]=arguments[_key28]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
621
|
+
// region testEachSingleParameterAgainstSameExpectation
|
|
622
|
+
/**
|
|
555
623
|
* Tests each given single parameter against same given expected value. It
|
|
556
624
|
* respects function signature to raise compile time errors if given test set
|
|
557
625
|
* does not match given function signature.
|
|
@@ -560,7 +628,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
560
628
|
* @param callback - Function reference to test.
|
|
561
629
|
* @param expected - Value to check each function call return value against.
|
|
562
630
|
* @param parameters - Additional first parameters to test given function with.
|
|
563
|
-
*/var _testEachSingleParameterAgainstSameExpectation=function _testEachSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var
|
|
631
|
+
*/var _testEachSingleParameterAgainstSameExpectation=function _testEachSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len29=arguments.length,parameters=new Array(_len29>4?_len29-4:0),_key29=4;_key29<_len29;_key29++){parameters[_key29-4]=arguments[_key29]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){expectExpectedType(expected===TEST_THROW_SYMBOL?function(){return callback(parameter)}:callback(parameter),expected)})};/**
|
|
564
632
|
* Tests each given single parameter against same given expected value. It
|
|
565
633
|
* respects function signature to raise compile time errors if given test set
|
|
566
634
|
* does not match given function signature.
|
|
@@ -568,7 +636,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
568
636
|
* @param callback - Function reference to test.
|
|
569
637
|
* @param expected - Value to check each function call return value against.
|
|
570
638
|
* @param parameters - Additional first parameters to test given function with.
|
|
571
|
-
*/var testEachSingleParameterAgainstSameExpectation=function testEachSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var
|
|
639
|
+
*/var testEachSingleParameterAgainstSameExpectation=function testEachSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len30=arguments.length,parameters=new Array(_len30>3?_len30-3:0),_key30=3;_key30<_len30;_key30++){parameters[_key30-3]=arguments[_key30]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len31=arguments.length,parameters=new Array(_len31>3?_len31-3:0),_key31=3;_key31<_len31;_key31++){parameters[_key31-3]=arguments[_key31]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len32=arguments.length,parameters=new Array(_len32>3?_len32-3:0),_key32=3;_key32<_len32;_key32++){parameters[_key32-3]=arguments[_key32]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
640
|
+
// region testEachResolvedPromiseWithSingleParameterAgainstSameExpectation
|
|
641
|
+
/**
|
|
572
642
|
* Tests each given single parameter against same given expected value. It
|
|
573
643
|
* respects function signature to raise compile time errors if given test set
|
|
574
644
|
* does not match given function signature.
|
|
@@ -577,7 +647,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
577
647
|
* @param callback - Function reference to test.
|
|
578
648
|
* @param expected - Value to check each function call return value against.
|
|
579
649
|
* @param parameters - Additional first parameters to test given function with.
|
|
580
|
-
*/var
|
|
650
|
+
*/var _testEachResolvedPromiseWithSingleParameterAgainstSameExpectation=function _testEachResolvedPromiseWithSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len33=arguments.length,parameters=new Array(_len33>4?_len33-4:0),_key33=4;_key33<_len33;_key33++){parameters[_key33-4]=arguments[_key33]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).resolves,expected,false)})};/**
|
|
581
651
|
* Tests each given single parameter against same given expected value. It
|
|
582
652
|
* respects function signature to raise compile time errors if given test set
|
|
583
653
|
* does not match given function signature.
|
|
@@ -585,7 +655,30 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
585
655
|
* @param callback - Function reference to test.
|
|
586
656
|
* @param expected - Value to check each function call return value against.
|
|
587
657
|
* @param parameters - Additional first parameters to test given function with.
|
|
588
|
-
*/var
|
|
658
|
+
*/var testEachResolvedPromiseWithSingleParameterAgainstSameExpectation=function testEachResolvedPromiseWithSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len34=arguments.length,parameters=new Array(_len34>3?_len34-3:0),_key34=3;_key34<_len34;_key34++){parameters[_key34-3]=arguments[_key34]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len35=arguments.length,parameters=new Array(_len35>3?_len35-3:0),_key35=3;_key35<_len35;_key35++){parameters[_key35-3]=arguments[_key35]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len36=arguments.length,parameters=new Array(_len36>3?_len36-3:0),_key36=3;_key36<_len36;_key36++){parameters[_key36-3]=arguments[_key36]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
659
|
+
// region testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise
|
|
660
|
+
/**
|
|
661
|
+
* Tests each given single parameter against same given promises resolving to
|
|
662
|
+
* expected value. It respects function signature to raise compile time errors
|
|
663
|
+
* if given test set does not match given function signature.
|
|
664
|
+
* @param tester - Underling testing function to use.
|
|
665
|
+
* @param functionName - Function description to test.
|
|
666
|
+
* @param callback - Function reference to test.
|
|
667
|
+
* @param expected - Promise resolving to value to check each function call
|
|
668
|
+
* return value against.
|
|
669
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
670
|
+
*/var _testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise=function _testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len37=arguments.length,parameters=new Array(_len37>4?_len37-4:0),_key37=4;_key37<_len37;_key37++){parameters[_key37-4]=arguments[_key37]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(parameter){var _t7,_t8;return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:_t7=expectExpectedType;_t8=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).resolves;_context4.n=1;return expected;case 1:return _context4.a(2,_t7(_t8,_context4.v,false))}},_callee4)})))};/**
|
|
671
|
+
* Tests each given single parameter against same given promises resolving to
|
|
672
|
+
* expected value. It respects function signature to raise compile time errors
|
|
673
|
+
* if given test set does not match given function signature.
|
|
674
|
+
* @param functionName - Function description to test.
|
|
675
|
+
* @param callback - Function reference to test.
|
|
676
|
+
* @param expected - Promise resolving to value to check each function call
|
|
677
|
+
* return value against.
|
|
678
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
679
|
+
*/var testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise=function testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise(functionName,callback,expected){for(var _len38=arguments.length,parameters=new Array(_len38>3?_len38-3:0),_key38=3;_key38<_len38;_key38++){parameters[_key38-3]=arguments[_key38]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len39=arguments.length,parameters=new Array(_len39>3?_len39-3:0),_key39=3;_key39<_len39;_key39++){parameters[_key39-3]=arguments[_key39]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len40=arguments.length,parameters=new Array(_len40>3?_len40-3:0),_key40=3;_key40<_len40;_key40++){parameters[_key40-3]=arguments[_key40]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
680
|
+
// region testEachRejectedPromiseWithSingleParameterAgainstSameExpectation
|
|
681
|
+
/**
|
|
589
682
|
* Tests each given single parameter against same given expected value. It
|
|
590
683
|
* respects function signature to raise compile time errors if given test set
|
|
591
684
|
* does not match given function signature.
|
|
@@ -594,7 +687,27 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
594
687
|
* @param callback - Function reference to test.
|
|
595
688
|
* @param expected - Value to check each function call return value against.
|
|
596
689
|
* @param parameters - Additional first parameters to test given function with.
|
|
597
|
-
*/var
|
|
690
|
+
*/var _testEachRejectedPromiseWithSingleParameterAgainstSameExpectation=function _testEachRejectedPromiseWithSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len41=arguments.length,parameters=new Array(_len41>4?_len41-4:0),_key41=4;_key41<_len41;_key41++){parameters[_key41-4]=arguments[_key41]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).rejects,expected,false)})};/**
|
|
691
|
+
* Tests each given single parameter against same given expected value. It
|
|
692
|
+
* respects function signature to raise compile time errors if given test set
|
|
693
|
+
* does not match given function signature.
|
|
694
|
+
* @param functionName - Function description to test.
|
|
695
|
+
* @param callback - Function reference to test.
|
|
696
|
+
* @param expected - Value to check each function call return value against.
|
|
697
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
698
|
+
*/var testEachRejectedPromiseWithSingleParameterAgainstSameExpectation=function testEachRejectedPromiseWithSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len42=arguments.length,parameters=new Array(_len42>3?_len42-3:0),_key42=3;_key42<_len42;_key42++){parameters[_key42-3]=arguments[_key42]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len43=arguments.length,parameters=new Array(_len43>3?_len43-3:0),_key43=3;_key43<_len43;_key43++){parameters[_key43-3]=arguments[_key43]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len44=arguments.length,parameters=new Array(_len44>3?_len44-3:0),_key44=3;_key44<_len44;_key44++){parameters[_key44-3]=arguments[_key44]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
699
|
+
// region testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise
|
|
700
|
+
/**
|
|
701
|
+
* Tests each given single parameter against same given promise resolving
|
|
702
|
+
* expected value. It respects function signature to raise compile time errors
|
|
703
|
+
* if given test set does not match given function signature.
|
|
704
|
+
* @param tester - Underling testing function to use.
|
|
705
|
+
* @param functionName - Function description to test.
|
|
706
|
+
* @param callback - Function reference to test.
|
|
707
|
+
* @param expected - Promise resolving to value to check each function call
|
|
708
|
+
* return value against.
|
|
709
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
710
|
+
*/var _testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise=function _testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len45=arguments.length,parameters=new Array(_len45>4?_len45-4:0),_key45=4;_key45<_len45;_key45++){parameters[_key45-4]=arguments[_key45]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(parameter){var _t9,_t0;return _regenerator().w(function(_context5){while(1)switch(_context5.n){case 0:_t9=expectExpectedType;_t0=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).rejects;_context5.n=1;return expected;case 1:return _context5.a(2,_t9(_t0,_context5.v,false))}},_callee5)})))};/**
|
|
598
711
|
* Tests each given single parameter against same given expected value. It
|
|
599
712
|
* respects function signature to raise compile time errors if given test set
|
|
600
713
|
* does not match given function signature.
|
|
@@ -602,7 +715,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
602
715
|
* @param callback - Function reference to test.
|
|
603
716
|
* @param expected - Value to check each function call return value against.
|
|
604
717
|
* @param parameters - Additional first parameters to test given function with.
|
|
605
|
-
*/var
|
|
718
|
+
*/var testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise=function testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise(functionName,callback,expected){for(var _len46=arguments.length,parameters=new Array(_len46>3?_len46-3:0),_key46=3;_key46<_len46;_key46++){parameters[_key46-3]=arguments[_key46]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len47=arguments.length,parameters=new Array(_len47>3?_len47-3:0),_key47=3;_key47<_len47;_key47++){parameters[_key47-3]=arguments[_key47]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len48=arguments.length,parameters=new Array(_len48>3?_len48-3:0),_key48=3;_key48<_len48;_key48++){parameters[_key48-3]=arguments[_key48]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
719
|
+
// region testEachAgainstSameExpectation
|
|
720
|
+
/**
|
|
606
721
|
* Tests each given test set (various list of function parameters) against same
|
|
607
722
|
* given expected value. It respects function signature to raise compile time
|
|
608
723
|
* errors if given test set does not match given function signature.
|
|
@@ -612,7 +727,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
612
727
|
* @param expected - Value to check each function call return value against.
|
|
613
728
|
* @param functionParameters - Additional lists of parameters to test given
|
|
614
729
|
* function again.
|
|
615
|
-
*/var _testEachAgainstSameExpectation=function _testEachAgainstSameExpectation(tester,functionName,callback,expected){for(var
|
|
730
|
+
*/var _testEachAgainstSameExpectation=function _testEachAgainstSameExpectation(tester,functionName,callback,expected){for(var _len49=arguments.length,functionParameters=new Array(_len49>4?_len49-4:0),_key49=4;_key49<_len49;_key49++){functionParameters[_key49-4]=arguments[_key49]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){for(var _len50=arguments.length,parameters=new Array(_len50),_key50=0;_key50<_len50;_key50++){parameters[_key50]=arguments[_key50]}expectExpectedType(expected===TEST_THROW_SYMBOL?function(){return callback.apply(void 0,parameters)}:callback.apply(void 0,parameters),expected)})};/**
|
|
616
731
|
* Tests each given test set (various list of function parameters) against same
|
|
617
732
|
* given expected value. It respects function signature to raise compile time
|
|
618
733
|
* errors if given test set does not match given function signature.
|
|
@@ -621,7 +736,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
621
736
|
* @param expected - Value to check each function call return value against.
|
|
622
737
|
* @param functionParameters - Additional lists of parameters to test given
|
|
623
738
|
* function again.
|
|
624
|
-
*/var testEachAgainstSameExpectation=function testEachAgainstSameExpectation(functionName,callback,expected){for(var
|
|
739
|
+
*/var testEachAgainstSameExpectation=function testEachAgainstSameExpectation(functionName,callback,expected){for(var _len51=arguments.length,functionParameters=new Array(_len51>3?_len51-3:0),_key51=3;_key51<_len51;_key51++){functionParameters[_key51-3]=arguments[_key51]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len52=arguments.length,functionParameters=new Array(_len52>3?_len52-3:0),_key52=3;_key52<_len52;_key52++){functionParameters[_key52-3]=arguments[_key52]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len53=arguments.length,functionParameters=new Array(_len53>3?_len53-3:0),_key53=3;_key53<_len53;_key53++){functionParameters[_key53-3]=arguments[_key53]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
740
|
+
// region testEachResolvedPromiseAgainstSameExpectation
|
|
741
|
+
/**
|
|
625
742
|
* Tests each given test set (various list of function parameters) against same
|
|
626
743
|
* given expected value. It respects function signature to raise compile time
|
|
627
744
|
* errors if given test set does not match given function signature.
|
|
@@ -631,7 +748,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
631
748
|
* @param expected - Value to check each function call return value against.
|
|
632
749
|
* @param functionParameters - Additional lists of parameters to test given
|
|
633
750
|
* function again.
|
|
634
|
-
*/var
|
|
751
|
+
*/var _testEachResolvedPromiseAgainstSameExpectation=function _testEachResolvedPromiseAgainstSameExpectation(tester,functionName,callback,expected){for(var _len54=arguments.length,functionParameters=new Array(_len54>4?_len54-4:0),_key54=4;_key54<_len54;_key54++){functionParameters[_key54-4]=arguments[_key54]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,arguments)).resolves,expected,false)})};/**
|
|
635
752
|
* Tests each given test set (various list of function parameters) against same
|
|
636
753
|
* given expected value. It respects function signature to raise compile time
|
|
637
754
|
* errors if given test set does not match given function signature.
|
|
@@ -640,7 +757,34 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
640
757
|
* @param expected - Value to check each function call return value against.
|
|
641
758
|
* @param functionParameters - Additional lists of parameters to test given
|
|
642
759
|
* function again.
|
|
643
|
-
*/var
|
|
760
|
+
*/var testEachResolvedPromiseAgainstSameExpectation=function testEachResolvedPromiseAgainstSameExpectation(functionName,callback,expected){for(var _len55=arguments.length,functionParameters=new Array(_len55>3?_len55-3:0),_key55=3;_key55<_len55;_key55++){functionParameters[_key55-3]=arguments[_key55]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len56=arguments.length,functionParameters=new Array(_len56>3?_len56-3:0),_key56=3;_key56<_len56;_key56++){functionParameters[_key56-3]=arguments[_key56]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len57=arguments.length,functionParameters=new Array(_len57>3?_len57-3:0),_key57=3;_key57<_len57;_key57++){functionParameters[_key57-3]=arguments[_key57]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
761
|
+
// region testEachResolvedPromiseAgainstSameResolvedPromise
|
|
762
|
+
/**
|
|
763
|
+
* Tests each given test set (various list of function parameters) against same
|
|
764
|
+
* given promise resolving expected value. It respects function signature to
|
|
765
|
+
* raise compile time errors if given test set does not match given function
|
|
766
|
+
* signature.
|
|
767
|
+
* @param tester - Underling testing function to use.
|
|
768
|
+
* @param functionName - Function description to test.
|
|
769
|
+
* @param callback - Function reference to test.
|
|
770
|
+
* @param expected - Promise resolving to value to check each function call
|
|
771
|
+
* return value against.
|
|
772
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
773
|
+
* function again.
|
|
774
|
+
*/var _testEachResolvedPromiseAgainstSameResolvedPromise=function _testEachResolvedPromiseAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len58=arguments.length,functionParameters=new Array(_len58>4?_len58-4:0),_key58=4;_key58<_len58;_key58++){functionParameters[_key58-4]=arguments[_key58]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(){var _args6=arguments,_t1,_t10;return _regenerator().w(function(_context6){while(1)switch(_context6.n){case 0:_t1=expectExpectedType;_t10=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,_args6)).resolves;_context6.n=1;return expected;case 1:return _context6.a(2,_t1(_t10,_context6.v,false))}},_callee6)})))};/**
|
|
775
|
+
* Tests each given test set (various list of function parameters) against same
|
|
776
|
+
* given promise resolving expected value. It respects function signature to
|
|
777
|
+
* raise compile time errors if given test set does not match given function
|
|
778
|
+
* signature.
|
|
779
|
+
* @param functionName - Function description to test.
|
|
780
|
+
* @param callback - Function reference to test.
|
|
781
|
+
* @param expected - Promise resolving to value to check each function call
|
|
782
|
+
* return value against.
|
|
783
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
784
|
+
* function again.
|
|
785
|
+
*/var testEachResolvedPromiseAgainstSameResolvedPromise=function testEachResolvedPromiseAgainstSameResolvedPromise(functionName,callback,expected){for(var _len59=arguments.length,functionParameters=new Array(_len59>3?_len59-3:0),_key59=3;_key59<_len59;_key59++){functionParameters[_key59-3]=arguments[_key59]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len60=arguments.length,functionParameters=new Array(_len60>3?_len60-3:0),_key60=3;_key60<_len60;_key60++){functionParameters[_key60-3]=arguments[_key60]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len61=arguments.length,functionParameters=new Array(_len61>3?_len61-3:0),_key61=3;_key61<_len61;_key61++){functionParameters[_key61-3]=arguments[_key61]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
786
|
+
// region testEachRejectedPromiseAgainstSameExpectation
|
|
787
|
+
/**
|
|
644
788
|
* Tests each given test set (various list of function parameters) against same
|
|
645
789
|
* given expected value. It respects function signature to raise compile time
|
|
646
790
|
* errors if given test set does not match given function signature.
|
|
@@ -650,7 +794,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
650
794
|
* @param expected - Value to check each function call return value against.
|
|
651
795
|
* @param functionParameters - Additional lists of parameters to test given
|
|
652
796
|
* function again.
|
|
653
|
-
*/var
|
|
797
|
+
*/var _testEachRejectedPromiseAgainstSameExpectation=function _testEachRejectedPromiseAgainstSameExpectation(tester,functionName,callback,expected){for(var _len62=arguments.length,functionParameters=new Array(_len62>4?_len62-4:0),_key62=4;_key62<_len62;_key62++){functionParameters[_key62-4]=arguments[_key62]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,arguments)).rejects,expected,false)})};/**
|
|
654
798
|
* Tests each given test set (various list of function parameters) against same
|
|
655
799
|
* given expected value. It respects function signature to raise compile time
|
|
656
800
|
* errors if given test set does not match given function signature.
|
|
@@ -659,5 +803,31 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
659
803
|
* @param expected - Value to check each function call return value against.
|
|
660
804
|
* @param functionParameters - Additional lists of parameters to test given
|
|
661
805
|
* function again.
|
|
662
|
-
*/var
|
|
663
|
-
|
|
806
|
+
*/var testEachRejectedPromiseAgainstSameExpectation=function testEachRejectedPromiseAgainstSameExpectation(functionName,callback,expected){for(var _len63=arguments.length,functionParameters=new Array(_len63>3?_len63-3:0),_key63=3;_key63<_len63;_key63++){functionParameters[_key63-3]=arguments[_key63]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len64=arguments.length,functionParameters=new Array(_len64>3?_len64-3:0),_key64=3;_key64<_len64;_key64++){functionParameters[_key64-3]=arguments[_key64]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len65=arguments.length,functionParameters=new Array(_len65>3?_len65-3:0),_key65=3;_key65<_len65;_key65++){functionParameters[_key65-3]=arguments[_key65]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
807
|
+
// region testEachRejectedPromiseAgainstSameResolvedPromise
|
|
808
|
+
/**
|
|
809
|
+
* Tests each given test set (various list of function parameters) against same
|
|
810
|
+
* given promise resolving expected value. It respects function signature to
|
|
811
|
+
* raise compile time errors if given test set does not match given function
|
|
812
|
+
* signature.
|
|
813
|
+
* @param tester - Underling testing function to use.
|
|
814
|
+
* @param functionName - Function description to test.
|
|
815
|
+
* @param callback - Function reference to test.
|
|
816
|
+
* @param expected - Promise resolving to Value to check each function call
|
|
817
|
+
* return value against.
|
|
818
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
819
|
+
* function again.
|
|
820
|
+
*/var _testEachRejectedPromiseAgainstSameResolvedPromise=function _testEachRejectedPromiseAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len66=arguments.length,functionParameters=new Array(_len66>4?_len66-4:0),_key66=4;_key66<_len66;_key66++){functionParameters[_key66-4]=arguments[_key66]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(){var _args7=arguments,_t11,_t12;return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_t11=expectExpectedType;_t12=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,_args7)).rejects;_context7.n=1;return expected;case 1:return _context7.a(2,_t11(_t12,_context7.v,false))}},_callee7)})))};/**
|
|
821
|
+
* Tests each given test set (various list of function parameters) against same
|
|
822
|
+
* given promise resolving expected value. It respects function signature to
|
|
823
|
+
* raise compile time errors if given test set does not match given function
|
|
824
|
+
* signature.
|
|
825
|
+
* @param functionName - Function description to test.
|
|
826
|
+
* @param callback - Function reference to test.
|
|
827
|
+
* @param expected - Promise resolving to value to check each function call
|
|
828
|
+
* return value against.
|
|
829
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
830
|
+
* function again.
|
|
831
|
+
*/var testEachRejectedPromiseAgainstSameResolvedPromise=function testEachRejectedPromiseAgainstSameResolvedPromise(functionName,callback,expected){for(var _len67=arguments.length,functionParameters=new Array(_len67>3?_len67-3:0),_key67=3;_key67<_len67;_key67++){functionParameters[_key67-3]=arguments[_key67]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len68=arguments.length,functionParameters=new Array(_len68>3?_len68-3:0),_key68=3;_key68<_len68;_key68++){functionParameters[_key68-3]=arguments[_key68]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len69=arguments.length,functionParameters=new Array(_len69>3?_len69-3:0),_key69=3;_key69<_len69;_key69++){functionParameters[_key69-3]=arguments[_key69]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
832
|
+
/* harmony default export */ var test_helper = (testEach);
|
|
833
|
+
export { TEST_DEFINED_SYMBOL, TEST_THROW_SYMBOL, TEST_UNDEFINED_SYMBOL, test_helper as default, expectExpectedType, testEach, testEachAgainstResolvedPromise, testEachAgainstSameExpectation, testEachRejectedPromise, testEachRejectedPromiseAgainstResolvedPromise, testEachRejectedPromiseAgainstSameExpectation, testEachRejectedPromiseAgainstSameResolvedPromise, testEachRejectedPromiseWithSingleParameterAgainstSameExpectation, testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise, testEachResolvedPromise, testEachResolvedPromiseAgainstResolvedPromise, testEachResolvedPromiseAgainstSameExpectation, testEachResolvedPromiseAgainstSameResolvedPromise, testEachResolvedPromiseWithSingleParameterAgainstSameExpectation, testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise, testEachSingleParameterAgainstSameExpectation };
|
package/dist/test-helper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AnyFunction, FirstParameter, FunctionTestTuple, FunctionTestPromiseTuple, FunctionTestPromiseRejectionTuple, TestMatchers as Matchers, TestSymbol, ThenParameter, UnknownFunction, FunctionTestAgainstResolvedPromiseTuple, FunctionTestPromiseAgainstResolvedPromiseTuple, FunctionTestPromiseRejectionAgainstResolvedPromiseTuple } from './type';
|
|
2
2
|
export declare const TEST_DEFINED_SYMBOL: unique symbol;
|
|
3
3
|
export declare const TEST_THROW_SYMBOL: unique symbol;
|
|
4
4
|
export declare const TEST_UNDEFINED_SYMBOL: unique symbol;
|
|
@@ -25,6 +25,21 @@ export declare const testEach: {
|
|
|
25
25
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
26
26
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
30
|
+
* various list of function parameters). It respects function signature to
|
|
31
|
+
* raise compile time errors if given test set does not match given function
|
|
32
|
+
* signature.
|
|
33
|
+
* @param functionName - Function description to test.
|
|
34
|
+
* @param callback - Function reference to test.
|
|
35
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
36
|
+
* function again.
|
|
37
|
+
*/
|
|
38
|
+
export declare const testEachAgainstResolvedPromise: {
|
|
39
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
40
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
41
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
42
|
+
};
|
|
28
43
|
/**
|
|
29
44
|
* Tests each given test set (expected value follows by various list of
|
|
30
45
|
* function parameters). It respects function signature to raise compile time
|
|
@@ -34,7 +49,7 @@ export declare const testEach: {
|
|
|
34
49
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
35
50
|
* function again.
|
|
36
51
|
*/
|
|
37
|
-
export declare const
|
|
52
|
+
export declare const testEachResolvedPromise: {
|
|
38
53
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
39
54
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
40
55
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
@@ -48,11 +63,35 @@ export declare const testEachPromise: {
|
|
|
48
63
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
49
64
|
* function again.
|
|
50
65
|
*/
|
|
51
|
-
export declare const
|
|
66
|
+
export declare const testEachResolvedPromiseAgainstResolvedPromise: <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseAgainstResolvedPromiseTuple<FunctionType>>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Tests each given test set (expected value follows by various list of
|
|
69
|
+
* function parameters). It respects function signature to raise compile time
|
|
70
|
+
* errors if given test set does not match given function signature.
|
|
71
|
+
* @param functionName - Function description to test.
|
|
72
|
+
* @param callback - Function reference to test.
|
|
73
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
74
|
+
* function again.
|
|
75
|
+
*/
|
|
76
|
+
export declare const testEachRejectedPromise: {
|
|
52
77
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
53
78
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
54
79
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
55
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Tests each given test set (expected value follows by various list of
|
|
83
|
+
* function parameters). It respects function signature to raise compile time
|
|
84
|
+
* errors if given test set does not match given function signature.
|
|
85
|
+
* @param functionName - Function description to test.
|
|
86
|
+
* @param callback - Function reference to test.
|
|
87
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
88
|
+
* function again.
|
|
89
|
+
*/
|
|
90
|
+
export declare const testEachRejectedPromiseAgainstResolvedPromise: {
|
|
91
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
92
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
93
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
94
|
+
};
|
|
56
95
|
/**
|
|
57
96
|
* Tests each given single parameter against same given expected value. It
|
|
58
97
|
* respects function signature to raise compile time errors if given test set
|
|
@@ -76,11 +115,26 @@ export declare const testEachSingleParameterAgainstSameExpectation: {
|
|
|
76
115
|
* @param expected - Value to check each function call return value against.
|
|
77
116
|
* @param parameters - Additional first parameters to test given function with.
|
|
78
117
|
*/
|
|
79
|
-
export declare const
|
|
118
|
+
export declare const testEachResolvedPromiseWithSingleParameterAgainstSameExpectation: {
|
|
80
119
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
81
120
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
82
121
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
83
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Tests each given single parameter against same given promises resolving to
|
|
125
|
+
* expected value. It respects function signature to raise compile time errors
|
|
126
|
+
* if given test set does not match given function signature.
|
|
127
|
+
* @param functionName - Function description to test.
|
|
128
|
+
* @param callback - Function reference to test.
|
|
129
|
+
* @param expected - Promise resolving to value to check each function call
|
|
130
|
+
* return value against.
|
|
131
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
132
|
+
*/
|
|
133
|
+
export declare const testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise: {
|
|
134
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
135
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
136
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
137
|
+
};
|
|
84
138
|
/**
|
|
85
139
|
* Tests each given single parameter against same given expected value. It
|
|
86
140
|
* respects function signature to raise compile time errors if given test set
|
|
@@ -90,11 +144,25 @@ export declare const testEachSingleParameterAgainstSamePromisedExpectation: {
|
|
|
90
144
|
* @param expected - Value to check each function call return value against.
|
|
91
145
|
* @param parameters - Additional first parameters to test given function with.
|
|
92
146
|
*/
|
|
93
|
-
export declare const
|
|
147
|
+
export declare const testEachRejectedPromiseWithSingleParameterAgainstSameExpectation: {
|
|
94
148
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
95
149
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
96
150
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
97
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Tests each given single parameter against same given expected value. It
|
|
154
|
+
* respects function signature to raise compile time errors if given test set
|
|
155
|
+
* does not match given function signature.
|
|
156
|
+
* @param functionName - Function description to test.
|
|
157
|
+
* @param callback - Function reference to test.
|
|
158
|
+
* @param expected - Value to check each function call return value against.
|
|
159
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
160
|
+
*/
|
|
161
|
+
export declare const testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise: {
|
|
162
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
163
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
164
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
165
|
+
};
|
|
98
166
|
/**
|
|
99
167
|
* Tests each given test set (various list of function parameters) against same
|
|
100
168
|
* given expected value. It respects function signature to raise compile time
|
|
@@ -120,11 +188,28 @@ export declare const testEachAgainstSameExpectation: {
|
|
|
120
188
|
* @param functionParameters - Additional lists of parameters to test given
|
|
121
189
|
* function again.
|
|
122
190
|
*/
|
|
123
|
-
export declare const
|
|
191
|
+
export declare const testEachResolvedPromiseAgainstSameExpectation: {
|
|
124
192
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
125
193
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
126
194
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
127
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Tests each given test set (various list of function parameters) against same
|
|
198
|
+
* given promise resolving expected value. It respects function signature to
|
|
199
|
+
* raise compile time errors if given test set does not match given function
|
|
200
|
+
* signature.
|
|
201
|
+
* @param functionName - Function description to test.
|
|
202
|
+
* @param callback - Function reference to test.
|
|
203
|
+
* @param expected - Promise resolving to value to check each function call
|
|
204
|
+
* return value against.
|
|
205
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
206
|
+
* function again.
|
|
207
|
+
*/
|
|
208
|
+
export declare const testEachResolvedPromiseAgainstSameResolvedPromise: {
|
|
209
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
210
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
211
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
212
|
+
};
|
|
128
213
|
/**
|
|
129
214
|
* Tests each given test set (various list of function parameters) against same
|
|
130
215
|
* given expected value. It respects function signature to raise compile time
|
|
@@ -135,9 +220,26 @@ export declare const testEachPromiseAgainstSameExpectation: {
|
|
|
135
220
|
* @param functionParameters - Additional lists of parameters to test given
|
|
136
221
|
* function again.
|
|
137
222
|
*/
|
|
138
|
-
export declare const
|
|
223
|
+
export declare const testEachRejectedPromiseAgainstSameExpectation: {
|
|
139
224
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
140
225
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
141
226
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
142
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Tests each given test set (various list of function parameters) against same
|
|
230
|
+
* given promise resolving expected value. It respects function signature to
|
|
231
|
+
* raise compile time errors if given test set does not match given function
|
|
232
|
+
* signature.
|
|
233
|
+
* @param functionName - Function description to test.
|
|
234
|
+
* @param callback - Function reference to test.
|
|
235
|
+
* @param expected - Promise resolving to value to check each function call
|
|
236
|
+
* return value against.
|
|
237
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
238
|
+
* function again.
|
|
239
|
+
*/
|
|
240
|
+
export declare const testEachRejectedPromiseAgainstSameResolvedPromise: {
|
|
241
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
242
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
243
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
244
|
+
};
|
|
143
245
|
export default testEach;
|
package/dist/test-helper.js
CHANGED
|
@@ -492,7 +492,7 @@ var object = __webpack_require__(3);
|
|
|
492
492
|
expect(FUNCTION(...parameters)).toStrictEqual(expected)
|
|
493
493
|
)
|
|
494
494
|
*/// region imports
|
|
495
|
-
|
|
495
|
+
function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}};// endregion
|
|
496
496
|
var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW_SYMBOL=Symbol.for("clientnodeTestHelperThrow");var TEST_UNDEFINED_SYMBOL=Symbol.for("clientnodeTestHelperUndefined");/**
|
|
497
497
|
* Tests given result against given expectations. Respects special symbol
|
|
498
498
|
* values.
|
|
@@ -500,7 +500,8 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
500
500
|
* @param expected - Expected result.
|
|
501
501
|
* @param wrap - Indicates whether to wrap with an expect function call.
|
|
502
502
|
* @returns Nothing or a promise resolving to nothing.
|
|
503
|
-
*/var expectExpectedType=function expectExpectedType(givenResult,expected,wrap){if(wrap===void 0){wrap=true}var result=wrap?__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(givenResult):givenResult;if(expected===TEST_DEFINED_SYMBOL)return result.toBeDefined();if(expected===TEST_UNDEFINED_SYMBOL)return result.not.toBeDefined();if(expected===TEST_THROW_SYMBOL)return result.toThrow();return result.toStrictEqual(expected)}
|
|
503
|
+
*/var expectExpectedType=function expectExpectedType(givenResult,expected,wrap){if(wrap===void 0){wrap=true}var result=wrap?__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(givenResult):givenResult;if(expected===TEST_DEFINED_SYMBOL)return result.toBeDefined();if(expected===TEST_UNDEFINED_SYMBOL)return result.not.toBeDefined();if(expected===TEST_THROW_SYMBOL)return result.toThrow();return result.toStrictEqual(expected)};// region testEach
|
|
504
|
+
/**
|
|
504
505
|
* Tests each given test set (expected value follows by various list of
|
|
505
506
|
* function parameters). It respects function signature to raise compile time
|
|
506
507
|
* errors if given test set does not match given function signature.
|
|
@@ -517,7 +518,30 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
517
518
|
* @param callback - Function reference to test.
|
|
518
519
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
519
520
|
* function again.
|
|
520
|
-
*/var testEach=function testEach(functionName,callback){for(var _len3=arguments.length,functionTestTuple=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++){functionTestTuple[_key3-2]=arguments[_key3]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEach.only=function(functionName,callback){for(var _len4=arguments.length,functionTestTuple=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++){functionTestTuple[_key4-2]=arguments[_key4]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEach.skip=function(functionName,callback){for(var _len5=arguments.length,functionTestTuple=new Array(_len5>2?_len5-2:0),_key5=2;_key5<_len5;_key5++){functionTestTuple[_key5-2]=arguments[_key5]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))}
|
|
521
|
+
*/var testEach=function testEach(functionName,callback){for(var _len3=arguments.length,functionTestTuple=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++){functionTestTuple[_key3-2]=arguments[_key3]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEach.only=function(functionName,callback){for(var _len4=arguments.length,functionTestTuple=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++){functionTestTuple[_key4-2]=arguments[_key4]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEach.skip=function(functionName,callback){for(var _len5=arguments.length,functionTestTuple=new Array(_len5>2?_len5-2:0),_key5=2;_key5<_len5;_key5++){functionTestTuple[_key5-2]=arguments[_key5]}_testEach.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
522
|
+
// region testEachAgainstResolvedPromise
|
|
523
|
+
/**
|
|
524
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
525
|
+
* various list of function parameters). It respects function signature to
|
|
526
|
+
* raise compile time errors if given test set does not match given function
|
|
527
|
+
* signature.
|
|
528
|
+
* @param tester - Underling testing function to use.
|
|
529
|
+
* @param functionName - Function description to test.
|
|
530
|
+
* @param callback - Function reference to test.
|
|
531
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
532
|
+
* function again.
|
|
533
|
+
*/var _testEachAgainstResolvedPromise=function _testEachAgainstResolvedPromise(tester,functionName,callback){for(var _len6=arguments.length,functionTestTuple=new Array(_len6>3?_len6-3:0),_key6=3;_key6<_len6;_key6++){functionTestTuple[_key6-3]=arguments[_key6]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(expected){var _len7,parameters,_key7,_args=arguments,_t,_t2;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:for(_len7=_args.length,parameters=new Array(_len7>1?_len7-1:0),_key7=1;_key7<_len7;_key7++){parameters[_key7-1]=_args[_key7]}_t=expectExpectedType;_t2=callback.apply(void 0,parameters);_context.n=1;return expected;case 1:_t(_t2,_context.v);case 2:return _context.a(2)}},_callee)})))};/**
|
|
534
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
535
|
+
* various list of function parameters). It respects function signature to
|
|
536
|
+
* raise compile time errors if given test set does not match given function
|
|
537
|
+
* signature.
|
|
538
|
+
* @param functionName - Function description to test.
|
|
539
|
+
* @param callback - Function reference to test.
|
|
540
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
541
|
+
* function again.
|
|
542
|
+
*/var testEachAgainstResolvedPromise=function testEachAgainstResolvedPromise(functionName,callback){for(var _len8=arguments.length,functionTestTuple=new Array(_len8>2?_len8-2:0),_key8=2;_key8<_len8;_key8++){functionTestTuple[_key8-2]=arguments[_key8]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachAgainstResolvedPromise.only=function(functionName,callback){for(var _len9=arguments.length,functionTestTuple=new Array(_len9>2?_len9-2:0),_key9=2;_key9<_len9;_key9++){functionTestTuple[_key9-2]=arguments[_key9]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachAgainstResolvedPromise.skip=function(functionName,callback){for(var _len0=arguments.length,functionTestTuple=new Array(_len0>2?_len0-2:0),_key0=2;_key0<_len0;_key0++){functionTestTuple[_key0-2]=arguments[_key0]}_testEachAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
543
|
+
// region testEachResolvedPromise
|
|
544
|
+
/**
|
|
521
545
|
* Tests each given test set (expected value follows by various list of
|
|
522
546
|
* function parameters). It respects function signature to raise compile time
|
|
523
547
|
* errors if given test set does not match given function signature.
|
|
@@ -526,7 +550,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
526
550
|
* @param callback - Function reference to test.
|
|
527
551
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
528
552
|
* function again.
|
|
529
|
-
*/var
|
|
553
|
+
*/var _testEachResolvedPromise=function _testEachResolvedPromise(tester,functionName,callback){for(var _len1=arguments.length,functionTestTuple=new Array(_len1>3?_len1-3:0),_key1=3;_key1<_len1;_key1++){functionTestTuple[_key1-3]=arguments[_key1]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),function(expected){for(var _len10=arguments.length,parameters=new Array(_len10>1?_len10-1:0),_key10=1;_key10<_len10;_key10++){parameters[_key10-1]=arguments[_key10]}return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).resolves,expected,false)})};/**
|
|
530
554
|
* Tests each given test set (expected value follows by various list of
|
|
531
555
|
* function parameters). It respects function signature to raise compile time
|
|
532
556
|
* errors if given test set does not match given function signature.
|
|
@@ -534,16 +558,58 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
534
558
|
* @param callback - Function reference to test.
|
|
535
559
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
536
560
|
* function again.
|
|
537
|
-
*/var
|
|
561
|
+
*/var testEachResolvedPromise=function testEachResolvedPromise(functionName,callback){for(var _len11=arguments.length,functionTestTuple=new Array(_len11>2?_len11-2:0),_key11=2;_key11<_len11;_key11++){functionTestTuple[_key11-2]=arguments[_key11]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.only=function(functionName,callback){for(var _len12=arguments.length,functionTestTuple=new Array(_len12>2?_len12-2:0),_key12=2;_key12<_len12;_key12++){functionTestTuple[_key12-2]=arguments[_key12]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.skip=function(functionName,callback){for(var _len13=arguments.length,functionTestTuple=new Array(_len13>2?_len13-2:0),_key13=2;_key13<_len13;_key13++){functionTestTuple[_key13-2]=arguments[_key13]}_testEachResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
562
|
+
// region testEachResolvedPromiseAgainstResolvedPromise
|
|
563
|
+
/**
|
|
564
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
565
|
+
* various list of function parameters). It respects function signature to
|
|
566
|
+
* raise compile time errors if given test set does not match given function
|
|
567
|
+
* signature.
|
|
568
|
+
* @param tester - Underling testing function to use.
|
|
569
|
+
* @param functionName - Function description to test.
|
|
570
|
+
* @param callback - Function reference to test.
|
|
571
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
572
|
+
* function again.
|
|
573
|
+
*/var _testEachResolvedPromiseAgainstResolvedPromise=function _testEachResolvedPromiseAgainstResolvedPromise(tester,functionName,callback){for(var _len14=arguments.length,functionTestTuple=new Array(_len14>3?_len14-3:0),_key14=3;_key14<_len14;_key14++){functionTestTuple[_key14-3]=arguments[_key14]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(expected){var _len15,parameters,_key15,_args2=arguments,_t3,_t4;return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:for(_len15=_args2.length,parameters=new Array(_len15>1?_len15-1:0),_key15=1;_key15<_len15;_key15++){parameters[_key15-1]=_args2[_key15]}_t3=expectExpectedType;_t4=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).resolves;_context2.n=1;return expected;case 1:return _context2.a(2,_t3(_t4,_context2.v,false))}},_callee2)})))};/**
|
|
538
574
|
* Tests each given test set (expected value follows by various list of
|
|
539
575
|
* function parameters). It respects function signature to raise compile time
|
|
540
576
|
* errors if given test set does not match given function signature.
|
|
577
|
+
* @param functionName - Function description to test.
|
|
578
|
+
* @param callback - Function reference to test.
|
|
579
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
580
|
+
* function again.
|
|
581
|
+
*/var testEachResolvedPromiseAgainstResolvedPromise=function testEachResolvedPromiseAgainstResolvedPromise(functionName,callback){for(var _len16=arguments.length,functionTestTuple=new Array(_len16>2?_len16-2:0),_key16=2;_key16<_len16;_key16++){functionTestTuple[_key16-2]=arguments[_key16]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.only=function(functionName,callback){for(var _len17=arguments.length,functionTestTuple=new Array(_len17>2?_len17-2:0),_key17=2;_key17<_len17;_key17++){functionTestTuple[_key17-2]=arguments[_key17]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachResolvedPromise.skip=function(functionName,callback){for(var _len18=arguments.length,functionTestTuple=new Array(_len18>2?_len18-2:0),_key18=2;_key18<_len18;_key18++){functionTestTuple[_key18-2]=arguments[_key18]}_testEachResolvedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
582
|
+
// region testEachRejectedPromise
|
|
583
|
+
/**
|
|
584
|
+
* Tests each given test set (expected value follows by various list of
|
|
585
|
+
* function parameters). It respects function signature to raise compile time
|
|
586
|
+
* errors if given test set does not match given function signature.
|
|
587
|
+
* @param tester - Underling testing function to use.
|
|
588
|
+
* @param functionName - Function description to test.
|
|
589
|
+
* @param callback - Function reference to test.
|
|
590
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
591
|
+
* function again.
|
|
592
|
+
*/var _testEachRejectedPromise=function _testEachRejectedPromise(tester,functionName,callback){for(var _len19=arguments.length,functionTestTuple=new Array(_len19>3?_len19-3:0),_key19=3;_key19<_len19;_key19++){functionTestTuple[_key19-3]=arguments[_key19]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),function(expected){for(var _len20=arguments.length,parameters=new Array(_len20>1?_len20-1:0),_key20=1;_key20<_len20;_key20++){parameters[_key20-1]=arguments[_key20]}return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).rejects,expected,false)})};/**
|
|
593
|
+
* Tests each given test set (expected value follows by various list of
|
|
594
|
+
* function parameters). It respects function signature to raise compile time
|
|
595
|
+
* errors if given test set does not match given function signature.
|
|
596
|
+
* @param functionName - Function description to test.
|
|
597
|
+
* @param callback - Function reference to test.
|
|
598
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
599
|
+
* function again.
|
|
600
|
+
*/var testEachRejectedPromise=function testEachRejectedPromise(functionName,callback){for(var _len21=arguments.length,functionTestTuple=new Array(_len21>2?_len21-2:0),_key21=2;_key21<_len21;_key21++){functionTestTuple[_key21-2]=arguments[_key21]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromise.only=function(functionName,callback){for(var _len22=arguments.length,functionTestTuple=new Array(_len22>2?_len22-2:0),_key22=2;_key22<_len22;_key22++){functionTestTuple[_key22-2]=arguments[_key22]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromise.skip=function(functionName,callback){for(var _len23=arguments.length,functionTestTuple=new Array(_len23>2?_len23-2:0),_key23=2;_key23<_len23;_key23++){functionTestTuple[_key23-2]=arguments[_key23]}_testEachRejectedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
601
|
+
// region testEachRejectedPromiseAgainstResolvedPromise
|
|
602
|
+
/**
|
|
603
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
604
|
+
* various list of function parameters). It respects function signature to
|
|
605
|
+
* raise compile time errors if given test set does not match given function
|
|
606
|
+
* signature.
|
|
541
607
|
* @param tester - Underling testing function to use.
|
|
542
608
|
* @param functionName - Function description to test.
|
|
543
609
|
* @param callback - Function reference to test.
|
|
544
610
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
545
611
|
* function again.
|
|
546
|
-
*/var
|
|
612
|
+
*/var _testEachRejectedPromiseAgainstResolvedPromise=function _testEachRejectedPromiseAgainstResolvedPromise(tester,functionName,callback){for(var _len24=arguments.length,functionTestTuple=new Array(_len24>3?_len24-3:0),_key24=3;_key24<_len24;_key24++){functionTestTuple[_key24-3]=arguments[_key24]}tester([].concat(functionTestTuple))("%p === ".concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(expected){var _len25,parameters,_key25,_args3=arguments,_t5,_t6;return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:for(_len25=_args3.length,parameters=new Array(_len25>1?_len25-1:0),_key25=1;_key25<_len25;_key25++){parameters[_key25-1]=_args3[_key25]}_t5=expectExpectedType;_t6=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,parameters)).rejects;_context3.n=1;return expected;case 1:return _context3.a(2,_t5(_t6,_context3.v,false))}},_callee3)})))};/**
|
|
547
613
|
* Tests each given test set (expected value follows by various list of
|
|
548
614
|
* function parameters). It respects function signature to raise compile time
|
|
549
615
|
* errors if given test set does not match given function signature.
|
|
@@ -551,7 +617,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
551
617
|
* @param callback - Function reference to test.
|
|
552
618
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
553
619
|
* function again.
|
|
554
|
-
*/var
|
|
620
|
+
*/var testEachRejectedPromiseAgainstResolvedPromise=function testEachRejectedPromiseAgainstResolvedPromise(functionName,callback){for(var _len26=arguments.length,functionTestTuple=new Array(_len26>2?_len26-2:0),_key26=2;_key26<_len26;_key26++){functionTestTuple[_key26-2]=arguments[_key26]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromiseAgainstResolvedPromise.only=function(functionName,callback){for(var _len27=arguments.length,functionTestTuple=new Array(_len27>2?_len27-2:0),_key27=2;_key27<_len27;_key27++){functionTestTuple[_key27-2]=arguments[_key27]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback].concat(functionTestTuple))};testEachRejectedPromiseAgainstResolvedPromise.skip=function(functionName,callback){for(var _len28=arguments.length,functionTestTuple=new Array(_len28>2?_len28-2:0),_key28=2;_key28<_len28;_key28++){functionTestTuple[_key28-2]=arguments[_key28]}_testEachRejectedPromiseAgainstResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback].concat(functionTestTuple))};// endregion
|
|
621
|
+
// region testEachSingleParameterAgainstSameExpectation
|
|
622
|
+
/**
|
|
555
623
|
* Tests each given single parameter against same given expected value. It
|
|
556
624
|
* respects function signature to raise compile time errors if given test set
|
|
557
625
|
* does not match given function signature.
|
|
@@ -560,7 +628,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
560
628
|
* @param callback - Function reference to test.
|
|
561
629
|
* @param expected - Value to check each function call return value against.
|
|
562
630
|
* @param parameters - Additional first parameters to test given function with.
|
|
563
|
-
*/var _testEachSingleParameterAgainstSameExpectation=function _testEachSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var
|
|
631
|
+
*/var _testEachSingleParameterAgainstSameExpectation=function _testEachSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len29=arguments.length,parameters=new Array(_len29>4?_len29-4:0),_key29=4;_key29<_len29;_key29++){parameters[_key29-4]=arguments[_key29]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){expectExpectedType(expected===TEST_THROW_SYMBOL?function(){return callback(parameter)}:callback(parameter),expected)})};/**
|
|
564
632
|
* Tests each given single parameter against same given expected value. It
|
|
565
633
|
* respects function signature to raise compile time errors if given test set
|
|
566
634
|
* does not match given function signature.
|
|
@@ -568,7 +636,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
568
636
|
* @param callback - Function reference to test.
|
|
569
637
|
* @param expected - Value to check each function call return value against.
|
|
570
638
|
* @param parameters - Additional first parameters to test given function with.
|
|
571
|
-
*/var testEachSingleParameterAgainstSameExpectation=function testEachSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var
|
|
639
|
+
*/var testEachSingleParameterAgainstSameExpectation=function testEachSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len30=arguments.length,parameters=new Array(_len30>3?_len30-3:0),_key30=3;_key30<_len30;_key30++){parameters[_key30-3]=arguments[_key30]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len31=arguments.length,parameters=new Array(_len31>3?_len31-3:0),_key31=3;_key31<_len31;_key31++){parameters[_key31-3]=arguments[_key31]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len32=arguments.length,parameters=new Array(_len32>3?_len32-3:0),_key32=3;_key32<_len32;_key32++){parameters[_key32-3]=arguments[_key32]}_testEachSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
640
|
+
// region testEachResolvedPromiseWithSingleParameterAgainstSameExpectation
|
|
641
|
+
/**
|
|
572
642
|
* Tests each given single parameter against same given expected value. It
|
|
573
643
|
* respects function signature to raise compile time errors if given test set
|
|
574
644
|
* does not match given function signature.
|
|
@@ -577,7 +647,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
577
647
|
* @param callback - Function reference to test.
|
|
578
648
|
* @param expected - Value to check each function call return value against.
|
|
579
649
|
* @param parameters - Additional first parameters to test given function with.
|
|
580
|
-
*/var
|
|
650
|
+
*/var _testEachResolvedPromiseWithSingleParameterAgainstSameExpectation=function _testEachResolvedPromiseWithSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len33=arguments.length,parameters=new Array(_len33>4?_len33-4:0),_key33=4;_key33<_len33;_key33++){parameters[_key33-4]=arguments[_key33]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).resolves,expected,false)})};/**
|
|
581
651
|
* Tests each given single parameter against same given expected value. It
|
|
582
652
|
* respects function signature to raise compile time errors if given test set
|
|
583
653
|
* does not match given function signature.
|
|
@@ -585,7 +655,30 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
585
655
|
* @param callback - Function reference to test.
|
|
586
656
|
* @param expected - Value to check each function call return value against.
|
|
587
657
|
* @param parameters - Additional first parameters to test given function with.
|
|
588
|
-
*/var
|
|
658
|
+
*/var testEachResolvedPromiseWithSingleParameterAgainstSameExpectation=function testEachResolvedPromiseWithSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len34=arguments.length,parameters=new Array(_len34>3?_len34-3:0),_key34=3;_key34<_len34;_key34++){parameters[_key34-3]=arguments[_key34]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len35=arguments.length,parameters=new Array(_len35>3?_len35-3:0),_key35=3;_key35<_len35;_key35++){parameters[_key35-3]=arguments[_key35]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len36=arguments.length,parameters=new Array(_len36>3?_len36-3:0),_key36=3;_key36<_len36;_key36++){parameters[_key36-3]=arguments[_key36]}_testEachResolvedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
659
|
+
// region testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise
|
|
660
|
+
/**
|
|
661
|
+
* Tests each given single parameter against same given promises resolving to
|
|
662
|
+
* expected value. It respects function signature to raise compile time errors
|
|
663
|
+
* if given test set does not match given function signature.
|
|
664
|
+
* @param tester - Underling testing function to use.
|
|
665
|
+
* @param functionName - Function description to test.
|
|
666
|
+
* @param callback - Function reference to test.
|
|
667
|
+
* @param expected - Promise resolving to value to check each function call
|
|
668
|
+
* return value against.
|
|
669
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
670
|
+
*/var _testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise=function _testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len37=arguments.length,parameters=new Array(_len37>4?_len37-4:0),_key37=4;_key37<_len37;_key37++){parameters[_key37-4]=arguments[_key37]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(parameter){var _t7,_t8;return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:_t7=expectExpectedType;_t8=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).resolves;_context4.n=1;return expected;case 1:return _context4.a(2,_t7(_t8,_context4.v,false))}},_callee4)})))};/**
|
|
671
|
+
* Tests each given single parameter against same given promises resolving to
|
|
672
|
+
* expected value. It respects function signature to raise compile time errors
|
|
673
|
+
* if given test set does not match given function signature.
|
|
674
|
+
* @param functionName - Function description to test.
|
|
675
|
+
* @param callback - Function reference to test.
|
|
676
|
+
* @param expected - Promise resolving to value to check each function call
|
|
677
|
+
* return value against.
|
|
678
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
679
|
+
*/var testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise=function testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise(functionName,callback,expected){for(var _len38=arguments.length,parameters=new Array(_len38>3?_len38-3:0),_key38=3;_key38<_len38;_key38++){parameters[_key38-3]=arguments[_key38]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len39=arguments.length,parameters=new Array(_len39>3?_len39-3:0),_key39=3;_key39<_len39;_key39++){parameters[_key39-3]=arguments[_key39]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len40=arguments.length,parameters=new Array(_len40>3?_len40-3:0),_key40=3;_key40<_len40;_key40++){parameters[_key40-3]=arguments[_key40]}_testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
680
|
+
// region testEachRejectedPromiseWithSingleParameterAgainstSameExpectation
|
|
681
|
+
/**
|
|
589
682
|
* Tests each given single parameter against same given expected value. It
|
|
590
683
|
* respects function signature to raise compile time errors if given test set
|
|
591
684
|
* does not match given function signature.
|
|
@@ -594,7 +687,27 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
594
687
|
* @param callback - Function reference to test.
|
|
595
688
|
* @param expected - Value to check each function call return value against.
|
|
596
689
|
* @param parameters - Additional first parameters to test given function with.
|
|
597
|
-
*/var
|
|
690
|
+
*/var _testEachRejectedPromiseWithSingleParameterAgainstSameExpectation=function _testEachRejectedPromiseWithSingleParameterAgainstSameExpectation(tester,functionName,callback,expected){for(var _len41=arguments.length,parameters=new Array(_len41>4?_len41-4:0),_key41=4;_key41<_len41;_key41++){parameters[_key41-4]=arguments[_key41]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),function(parameter){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).rejects,expected,false)})};/**
|
|
691
|
+
* Tests each given single parameter against same given expected value. It
|
|
692
|
+
* respects function signature to raise compile time errors if given test set
|
|
693
|
+
* does not match given function signature.
|
|
694
|
+
* @param functionName - Function description to test.
|
|
695
|
+
* @param callback - Function reference to test.
|
|
696
|
+
* @param expected - Value to check each function call return value against.
|
|
697
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
698
|
+
*/var testEachRejectedPromiseWithSingleParameterAgainstSameExpectation=function testEachRejectedPromiseWithSingleParameterAgainstSameExpectation(functionName,callback,expected){for(var _len42=arguments.length,parameters=new Array(_len42>3?_len42-3:0),_key42=3;_key42<_len42;_key42++){parameters[_key42-3]=arguments[_key42]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len43=arguments.length,parameters=new Array(_len43>3?_len43-3:0),_key43=3;_key43<_len43;_key43++){parameters[_key43-3]=arguments[_key43]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len44=arguments.length,parameters=new Array(_len44>3?_len44-3:0),_key44=3;_key44<_len44;_key44++){parameters[_key44-3]=arguments[_key44]}_testEachRejectedPromiseWithSingleParameterAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
699
|
+
// region testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise
|
|
700
|
+
/**
|
|
701
|
+
* Tests each given single parameter against same given promise resolving
|
|
702
|
+
* expected value. It respects function signature to raise compile time errors
|
|
703
|
+
* if given test set does not match given function signature.
|
|
704
|
+
* @param tester - Underling testing function to use.
|
|
705
|
+
* @param functionName - Function description to test.
|
|
706
|
+
* @param callback - Function reference to test.
|
|
707
|
+
* @param expected - Promise resolving to value to check each function call
|
|
708
|
+
* return value against.
|
|
709
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
710
|
+
*/var _testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise=function _testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len45=arguments.length,parameters=new Array(_len45>4?_len45-4:0),_key45=4;_key45<_len45;_key45++){parameters[_key45-4]=arguments[_key45]}tester([].concat(parameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(parameter){var _t9,_t0;return _regenerator().w(function(_context5){while(1)switch(_context5.n){case 0:_t9=expectExpectedType;_t0=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback(parameter)).rejects;_context5.n=1;return expected;case 1:return _context5.a(2,_t9(_t0,_context5.v,false))}},_callee5)})))};/**
|
|
598
711
|
* Tests each given single parameter against same given expected value. It
|
|
599
712
|
* respects function signature to raise compile time errors if given test set
|
|
600
713
|
* does not match given function signature.
|
|
@@ -602,7 +715,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
602
715
|
* @param callback - Function reference to test.
|
|
603
716
|
* @param expected - Value to check each function call return value against.
|
|
604
717
|
* @param parameters - Additional first parameters to test given function with.
|
|
605
|
-
*/var
|
|
718
|
+
*/var testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise=function testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise(functionName,callback,expected){for(var _len46=arguments.length,parameters=new Array(_len46>3?_len46-3:0),_key46=3;_key46<_len46;_key46++){parameters[_key46-3]=arguments[_key46]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len47=arguments.length,parameters=new Array(_len47>3?_len47-3:0),_key47=3;_key47<_len47;_key47++){parameters[_key47-3]=arguments[_key47]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(parameters))};testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len48=arguments.length,parameters=new Array(_len48>3?_len48-3:0),_key48=3;_key48<_len48;_key48++){parameters[_key48-3]=arguments[_key48]}_testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(parameters))};// endregion
|
|
719
|
+
// region testEachAgainstSameExpectation
|
|
720
|
+
/**
|
|
606
721
|
* Tests each given test set (various list of function parameters) against same
|
|
607
722
|
* given expected value. It respects function signature to raise compile time
|
|
608
723
|
* errors if given test set does not match given function signature.
|
|
@@ -612,7 +727,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
612
727
|
* @param expected - Value to check each function call return value against.
|
|
613
728
|
* @param functionParameters - Additional lists of parameters to test given
|
|
614
729
|
* function again.
|
|
615
|
-
*/var _testEachAgainstSameExpectation=function _testEachAgainstSameExpectation(tester,functionName,callback,expected){for(var
|
|
730
|
+
*/var _testEachAgainstSameExpectation=function _testEachAgainstSameExpectation(tester,functionName,callback,expected){for(var _len49=arguments.length,functionParameters=new Array(_len49>4?_len49-4:0),_key49=4;_key49<_len49;_key49++){functionParameters[_key49-4]=arguments[_key49]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){for(var _len50=arguments.length,parameters=new Array(_len50),_key50=0;_key50<_len50;_key50++){parameters[_key50]=arguments[_key50]}expectExpectedType(expected===TEST_THROW_SYMBOL?function(){return callback.apply(void 0,parameters)}:callback.apply(void 0,parameters),expected)})};/**
|
|
616
731
|
* Tests each given test set (various list of function parameters) against same
|
|
617
732
|
* given expected value. It respects function signature to raise compile time
|
|
618
733
|
* errors if given test set does not match given function signature.
|
|
@@ -621,7 +736,9 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
621
736
|
* @param expected - Value to check each function call return value against.
|
|
622
737
|
* @param functionParameters - Additional lists of parameters to test given
|
|
623
738
|
* function again.
|
|
624
|
-
*/var testEachAgainstSameExpectation=function testEachAgainstSameExpectation(functionName,callback,expected){for(var
|
|
739
|
+
*/var testEachAgainstSameExpectation=function testEachAgainstSameExpectation(functionName,callback,expected){for(var _len51=arguments.length,functionParameters=new Array(_len51>3?_len51-3:0),_key51=3;_key51<_len51;_key51++){functionParameters[_key51-3]=arguments[_key51]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len52=arguments.length,functionParameters=new Array(_len52>3?_len52-3:0),_key52=3;_key52<_len52;_key52++){functionParameters[_key52-3]=arguments[_key52]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len53=arguments.length,functionParameters=new Array(_len53>3?_len53-3:0),_key53=3;_key53<_len53;_key53++){functionParameters[_key53-3]=arguments[_key53]}_testEachAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
740
|
+
// region testEachResolvedPromiseAgainstSameExpectation
|
|
741
|
+
/**
|
|
625
742
|
* Tests each given test set (various list of function parameters) against same
|
|
626
743
|
* given expected value. It respects function signature to raise compile time
|
|
627
744
|
* errors if given test set does not match given function signature.
|
|
@@ -631,7 +748,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
631
748
|
* @param expected - Value to check each function call return value against.
|
|
632
749
|
* @param functionParameters - Additional lists of parameters to test given
|
|
633
750
|
* function again.
|
|
634
|
-
*/var
|
|
751
|
+
*/var _testEachResolvedPromiseAgainstSameExpectation=function _testEachResolvedPromiseAgainstSameExpectation(tester,functionName,callback,expected){for(var _len54=arguments.length,functionParameters=new Array(_len54>4?_len54-4:0),_key54=4;_key54<_len54;_key54++){functionParameters[_key54-4]=arguments[_key54]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,arguments)).resolves,expected,false)})};/**
|
|
635
752
|
* Tests each given test set (various list of function parameters) against same
|
|
636
753
|
* given expected value. It respects function signature to raise compile time
|
|
637
754
|
* errors if given test set does not match given function signature.
|
|
@@ -640,7 +757,34 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
640
757
|
* @param expected - Value to check each function call return value against.
|
|
641
758
|
* @param functionParameters - Additional lists of parameters to test given
|
|
642
759
|
* function again.
|
|
643
|
-
*/var
|
|
760
|
+
*/var testEachResolvedPromiseAgainstSameExpectation=function testEachResolvedPromiseAgainstSameExpectation(functionName,callback,expected){for(var _len55=arguments.length,functionParameters=new Array(_len55>3?_len55-3:0),_key55=3;_key55<_len55;_key55++){functionParameters[_key55-3]=arguments[_key55]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len56=arguments.length,functionParameters=new Array(_len56>3?_len56-3:0),_key56=3;_key56<_len56;_key56++){functionParameters[_key56-3]=arguments[_key56]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len57=arguments.length,functionParameters=new Array(_len57>3?_len57-3:0),_key57=3;_key57<_len57;_key57++){functionParameters[_key57-3]=arguments[_key57]}_testEachResolvedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
761
|
+
// region testEachResolvedPromiseAgainstSameResolvedPromise
|
|
762
|
+
/**
|
|
763
|
+
* Tests each given test set (various list of function parameters) against same
|
|
764
|
+
* given promise resolving expected value. It respects function signature to
|
|
765
|
+
* raise compile time errors if given test set does not match given function
|
|
766
|
+
* signature.
|
|
767
|
+
* @param tester - Underling testing function to use.
|
|
768
|
+
* @param functionName - Function description to test.
|
|
769
|
+
* @param callback - Function reference to test.
|
|
770
|
+
* @param expected - Promise resolving to value to check each function call
|
|
771
|
+
* return value against.
|
|
772
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
773
|
+
* function again.
|
|
774
|
+
*/var _testEachResolvedPromiseAgainstSameResolvedPromise=function _testEachResolvedPromiseAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len58=arguments.length,functionParameters=new Array(_len58>4?_len58-4:0),_key58=4;_key58<_len58;_key58++){functionParameters[_key58-4]=arguments[_key58]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(){var _args6=arguments,_t1,_t10;return _regenerator().w(function(_context6){while(1)switch(_context6.n){case 0:_t1=expectExpectedType;_t10=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,_args6)).resolves;_context6.n=1;return expected;case 1:return _context6.a(2,_t1(_t10,_context6.v,false))}},_callee6)})))};/**
|
|
775
|
+
* Tests each given test set (various list of function parameters) against same
|
|
776
|
+
* given promise resolving expected value. It respects function signature to
|
|
777
|
+
* raise compile time errors if given test set does not match given function
|
|
778
|
+
* signature.
|
|
779
|
+
* @param functionName - Function description to test.
|
|
780
|
+
* @param callback - Function reference to test.
|
|
781
|
+
* @param expected - Promise resolving to value to check each function call
|
|
782
|
+
* return value against.
|
|
783
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
784
|
+
* function again.
|
|
785
|
+
*/var testEachResolvedPromiseAgainstSameResolvedPromise=function testEachResolvedPromiseAgainstSameResolvedPromise(functionName,callback,expected){for(var _len59=arguments.length,functionParameters=new Array(_len59>3?_len59-3:0),_key59=3;_key59<_len59;_key59++){functionParameters[_key59-3]=arguments[_key59]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len60=arguments.length,functionParameters=new Array(_len60>3?_len60-3:0),_key60=3;_key60<_len60;_key60++){functionParameters[_key60-3]=arguments[_key60]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachResolvedPromiseAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len61=arguments.length,functionParameters=new Array(_len61>3?_len61-3:0),_key61=3;_key61<_len61;_key61++){functionParameters[_key61-3]=arguments[_key61]}_testEachResolvedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
786
|
+
// region testEachRejectedPromiseAgainstSameExpectation
|
|
787
|
+
/**
|
|
644
788
|
* Tests each given test set (various list of function parameters) against same
|
|
645
789
|
* given expected value. It respects function signature to raise compile time
|
|
646
790
|
* errors if given test set does not match given function signature.
|
|
@@ -650,7 +794,7 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
650
794
|
* @param expected - Value to check each function call return value against.
|
|
651
795
|
* @param functionParameters - Additional lists of parameters to test given
|
|
652
796
|
* function again.
|
|
653
|
-
*/var
|
|
797
|
+
*/var _testEachRejectedPromiseAgainstSameExpectation=function _testEachRejectedPromiseAgainstSameExpectation(tester,functionName,callback,expected){for(var _len62=arguments.length,functionParameters=new Array(_len62>4?_len62-4:0),_key62=4;_key62<_len62;_key62++){functionParameters[_key62-4]=arguments[_key62]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),function(){return expectExpectedType(__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,arguments)).rejects,expected,false)})};/**
|
|
654
798
|
* Tests each given test set (various list of function parameters) against same
|
|
655
799
|
* given expected value. It respects function signature to raise compile time
|
|
656
800
|
* errors if given test set does not match given function signature.
|
|
@@ -659,5 +803,31 @@ var TEST_DEFINED_SYMBOL=Symbol.for("clientnodeTestHelperDefined");var TEST_THROW
|
|
|
659
803
|
* @param expected - Value to check each function call return value against.
|
|
660
804
|
* @param functionParameters - Additional lists of parameters to test given
|
|
661
805
|
* function again.
|
|
662
|
-
*/var
|
|
663
|
-
|
|
806
|
+
*/var testEachRejectedPromiseAgainstSameExpectation=function testEachRejectedPromiseAgainstSameExpectation(functionName,callback,expected){for(var _len63=arguments.length,functionParameters=new Array(_len63>3?_len63-3:0),_key63=3;_key63<_len63;_key63++){functionParameters[_key63-3]=arguments[_key63]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameExpectation.only=function(functionName,callback,expected){for(var _len64=arguments.length,functionParameters=new Array(_len64>3?_len64-3:0),_key64=3;_key64<_len64;_key64++){functionParameters[_key64-3]=arguments[_key64]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameExpectation.skip=function(functionName,callback,expected){for(var _len65=arguments.length,functionParameters=new Array(_len65>3?_len65-3:0),_key65=3;_key65<_len65;_key65++){functionParameters[_key65-3]=arguments[_key65]}_testEachRejectedPromiseAgainstSameExpectation.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
807
|
+
// region testEachRejectedPromiseAgainstSameResolvedPromise
|
|
808
|
+
/**
|
|
809
|
+
* Tests each given test set (various list of function parameters) against same
|
|
810
|
+
* given promise resolving expected value. It respects function signature to
|
|
811
|
+
* raise compile time errors if given test set does not match given function
|
|
812
|
+
* signature.
|
|
813
|
+
* @param tester - Underling testing function to use.
|
|
814
|
+
* @param functionName - Function description to test.
|
|
815
|
+
* @param callback - Function reference to test.
|
|
816
|
+
* @param expected - Promise resolving to Value to check each function call
|
|
817
|
+
* return value against.
|
|
818
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
819
|
+
* function again.
|
|
820
|
+
*/var _testEachRejectedPromiseAgainstSameResolvedPromise=function _testEachRejectedPromiseAgainstSameResolvedPromise(tester,functionName,callback,expected){for(var _len66=arguments.length,functionParameters=new Array(_len66>4?_len66-4:0),_key66=4;_key66<_len66;_key66++){functionParameters[_key66-4]=arguments[_key66]}tester([].concat(functionParameters))("".concat((0,object/* represent */.Do)(expected)," === ").concat(functionName,"(%p, ...)"),/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(){var _args7=arguments,_t11,_t12;return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_t11=expectExpectedType;_t12=__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_expect__(callback.apply(void 0,_args7)).rejects;_context7.n=1;return expected;case 1:return _context7.a(2,_t11(_t12,_context7.v,false))}},_callee7)})))};/**
|
|
821
|
+
* Tests each given test set (various list of function parameters) against same
|
|
822
|
+
* given promise resolving expected value. It respects function signature to
|
|
823
|
+
* raise compile time errors if given test set does not match given function
|
|
824
|
+
* signature.
|
|
825
|
+
* @param functionName - Function description to test.
|
|
826
|
+
* @param callback - Function reference to test.
|
|
827
|
+
* @param expected - Promise resolving to value to check each function call
|
|
828
|
+
* return value against.
|
|
829
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
830
|
+
* function again.
|
|
831
|
+
*/var testEachRejectedPromiseAgainstSameResolvedPromise=function testEachRejectedPromiseAgainstSameResolvedPromise(functionName,callback,expected){for(var _len67=arguments.length,functionParameters=new Array(_len67>3?_len67-3:0),_key67=3;_key67<_len67;_key67++){functionParameters[_key67-3]=arguments[_key67]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameResolvedPromise.only=function(functionName,callback,expected){for(var _len68=arguments.length,functionParameters=new Array(_len68>3?_len68-3:0),_key68=3;_key68<_len68;_key68++){functionParameters[_key68-3]=arguments[_key68]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.only.each,functionName,callback,expected].concat(functionParameters))};testEachRejectedPromiseAgainstSameResolvedPromise.skip=function(functionName,callback,expected){for(var _len69=arguments.length,functionParameters=new Array(_len69>3?_len69-3:0),_key69=3;_key69<_len69;_key69++){functionParameters[_key69-3]=arguments[_key69]}_testEachRejectedPromiseAgainstSameResolvedPromise.apply(void 0,[__WEBPACK_EXTERNAL_MODULE__jest_globals_d700ac6c_test__.skip.each,functionName,callback,expected].concat(functionParameters))};// endregion
|
|
832
|
+
/* harmony default export */ var test_helper = (testEach);
|
|
833
|
+
export { TEST_DEFINED_SYMBOL, TEST_THROW_SYMBOL, TEST_UNDEFINED_SYMBOL, test_helper as default, expectExpectedType, testEach, testEachAgainstResolvedPromise, testEachAgainstSameExpectation, testEachRejectedPromise, testEachRejectedPromiseAgainstResolvedPromise, testEachRejectedPromiseAgainstSameExpectation, testEachRejectedPromiseAgainstSameResolvedPromise, testEachRejectedPromiseWithSingleParameterAgainstSameExpectation, testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise, testEachResolvedPromise, testEachResolvedPromiseAgainstResolvedPromise, testEachResolvedPromiseAgainstSameExpectation, testEachResolvedPromiseAgainstSameResolvedPromise, testEachResolvedPromiseWithSingleParameterAgainstSameExpectation, testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise, testEachSingleParameterAgainstSameExpectation };
|
package/dist/type.d.ts
CHANGED
|
@@ -13,11 +13,17 @@ export type FunctionTestTuple<FunctionType extends AnyFunction> = [
|
|
|
13
13
|
ReturnType<FunctionType>,
|
|
14
14
|
...Parameters<FunctionType>
|
|
15
15
|
];
|
|
16
|
+
export type FunctionTestAgainstResolvedPromiseTuple<FunctionType extends AnyFunction> = [Promise<ReturnType<FunctionType>>, ...Parameters<FunctionType>];
|
|
16
17
|
export type FunctionTestPromiseTuple<FunctionType extends AnyFunction> = [
|
|
17
18
|
ThenParameter<ReturnType<FunctionType>>,
|
|
18
19
|
...Parameters<FunctionType>
|
|
19
20
|
];
|
|
21
|
+
export type FunctionTestPromiseAgainstResolvedPromiseTuple<FunctionType extends AnyFunction> = [
|
|
22
|
+
Promise<ThenParameter<ReturnType<FunctionType>>>,
|
|
23
|
+
...Parameters<FunctionType>
|
|
24
|
+
];
|
|
20
25
|
export type FunctionTestPromiseRejectionTuple<FunctionType extends AnyFunction> = [Error, ...Parameters<FunctionType>];
|
|
26
|
+
export type FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType extends AnyFunction> = [Promise<Error>, ...Parameters<FunctionType>];
|
|
21
27
|
export type TestSymbol = (typeof TEST_DEFINED_SYMBOL | typeof TEST_THROW_SYMBOL | typeof TEST_UNDEFINED_SYMBOL);
|
|
22
28
|
export type ThenParameter<Type> = Type extends PromiseLike<infer U> ? U : Type;
|
|
23
29
|
export type ThenParameterRecursive<Type> = Type extends PromiseLike<infer U> ? ThenParameterRecursive<U> : Type;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clientnode",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1479",
|
|
4
4
|
"description": "Handy utilities for any JavaScript environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"client",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"prop-types": "^15.8.1",
|
|
102
102
|
"rimraf": "^6.1.3",
|
|
103
103
|
"typescript-eslint": "^8.65.0",
|
|
104
|
-
"web-documentation": "^1.0.
|
|
104
|
+
"web-documentation": "^1.0.44",
|
|
105
105
|
"weboptimizer": "^4.0.44",
|
|
106
106
|
"webpack-dev-server": "^6.0.0"
|
|
107
107
|
},
|
package/readme.md
CHANGED
|
@@ -91,20 +91,21 @@ import {createDomNodes, evaluateExpression} from 'cientnode'
|
|
|
91
91
|
<!--showExample-->
|
|
92
92
|
|
|
93
93
|
```HTML
|
|
94
|
-
<script src="https://unpkg.com/clientnode@latest/dist/bundle/index.js">
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
94
|
<div id="first-example-playground"></div>
|
|
98
95
|
```
|
|
99
96
|
|
|
100
97
|
<!--showExample:JavaScript-->
|
|
101
98
|
|
|
102
99
|
```JavaScript
|
|
103
|
-
|
|
100
|
+
import {
|
|
101
|
+
fadeIn, fadeOut, createDomNodes
|
|
102
|
+
} from 'https://unpkg.com/clientnode@latest/dist/bundle/index.js'
|
|
103
|
+
|
|
104
|
+
const domNode = createDomNodes('<p>some content to animate</p>')
|
|
104
105
|
|
|
105
106
|
const endless = () => {
|
|
106
|
-
|
|
107
|
-
.then(() =>
|
|
107
|
+
fadeIn(domNode)
|
|
108
|
+
.then(() => fadeOut(domNode))
|
|
108
109
|
.then(endless)
|
|
109
110
|
}
|
|
110
111
|
endless()
|
|
@@ -137,8 +138,12 @@ Execute a JSON based expression:
|
|
|
137
138
|
<!--showExample:JavaScript-->
|
|
138
139
|
|
|
139
140
|
```JavaScript
|
|
141
|
+
import {
|
|
142
|
+
evaluateExpression
|
|
143
|
+
} from 'https://unpkg.com/clientnode@latest/dist/bundle/index.js'
|
|
144
|
+
|
|
140
145
|
document.querySelector('#second-example-playground').innerText =
|
|
141
|
-
|
|
146
|
+
evaluateExpression(
|
|
142
147
|
{
|
|
143
148
|
$operator: '+',
|
|
144
149
|
operand1: 2,
|