aotrautils-srv 0.0.376 → 0.0.378

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (10/12/2022-03:07:49)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (10/12/2022-05:14:08)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -710,16 +710,13 @@ aotest.assert=function(booleanCondition, behavior){
710
710
  -message : string
711
711
  -children
712
712
  [name] :
713
- ...(IDEM)... with :
714
- -type="testResult"
713
+ ...(IDEM)... with : -type="testResult"
715
714
  -children
716
715
  [name] :
717
- ...(IDEM)... with :
718
- -type="scenarioResult"
716
+ ...(IDEM)... with : -type="scenarioResult"
719
717
  (-children // (sub-scenarii :)
720
718
  [name] :
721
- ...(IDEM)... with :
722
- -type="scenarioResult" )*
719
+ ...(IDEM)... with : -type="scenarioResult" )*
723
720
 
724
721
  *
725
722
  * */
@@ -738,6 +735,19 @@ aotest.run=function(testName=null,scenarioName=null){
738
735
  if(window.aotestAllTestsManager.isEmpty()){
739
736
  // TRACE
740
737
  console.log("WARN : No registered javascript tests to run. Aborting.");
738
+
739
+ const emptyTestsSuiteResult={
740
+ global:{
741
+ type:"testsSuiteResult", childrenFailed:0, childrenRunned:0,
742
+ isFailed:false,
743
+ message:"No registered javascript tests to run.",
744
+ expected:null,
745
+ actual:null,
746
+ },
747
+ children:{},
748
+ };
749
+ testsResultsObj["emptyTestsSuite"]=emptyTestsSuiteResult;
750
+
741
751
  return testsResultsObj;
742
752
  }
743
753
 
@@ -1969,6 +1979,11 @@ window.getAt=function(associativeOrNormalArray,index,returnKey=false){
1969
1979
  });
1970
1980
  }
1971
1981
 
1982
+ window.getLast=function(associativeOrNormalArray){
1983
+ if(empty(associativeOrNormalArray)) return null;
1984
+ return getAt(associativeOrNormalArray, getArraySize(associativeOrNormalArray)-1);
1985
+ }
1986
+
1972
1987
 
1973
1988
  /*
1974
1989
  * KEEP CODE : (interesting syntax...!) function getFunctionName(fn){ var f =
@@ -4835,7 +4850,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4835
4850
 
4836
4851
 
4837
4852
 
4838
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (10/12/2022-03:07:49)»*/
4853
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (10/12/2022-05:14:08)»*/
4839
4854
  /*-----------------------------------------------------------------------------*/
4840
4855
 
4841
4856
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.376",
3
+ "version": "0.0.378",
4
4
  "main": "aotrautils-srv.build.js",
5
5
  "description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",