aotrautils 0.0.379 → 0.0.381

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 (09/12/2022-15:57:10)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (10/12/2022-03:28:33)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -698,10 +698,10 @@ aotest.assert=function(booleanCondition, behavior){
698
698
  throw "(Assert failed : evaluated condition failed instead of succeeded.)";
699
699
  };
700
700
 
701
- /*
701
+ /* STANDARD AOTEST RESULT :
702
702
  * This method returns a tests results report object of the following structure :
703
703
  *
704
- * [name]:
704
+ [name]:
705
705
  -global
706
706
  -type:string="testsSuiteResult"
707
707
  -childrenFailed : number
@@ -711,12 +711,16 @@ aotest.assert=function(booleanCondition, behavior){
711
711
  -children
712
712
  [name] :
713
713
  ...(IDEM)... with :
714
- -type="scenarioResult"
714
+ -type="testResult"
715
715
  -children
716
716
  [name] :
717
717
  ...(IDEM)... with :
718
- -type="testResult"
719
- *
718
+ -type="scenarioResult"
719
+ (-children // (sub-scenarii :)
720
+ [name] :
721
+ ...(IDEM)... with :
722
+ -type="scenarioResult" )*
723
+
720
724
  *
721
725
  * */
722
726
 
@@ -740,7 +744,7 @@ aotest.run=function(testName=null,scenarioName=null){
740
744
  aotest.isRunning=true;
741
745
 
742
746
  // Function 1, case run one test>one scenario
743
- var runOneTestOneScenario=function(chosenTestParam, chosenScenarioParam){
747
+ const runOneTestOneScenario=function(chosenTestParam, chosenScenarioParam){
744
748
 
745
749
 
746
750
  let scenarioResultObjLocal={
@@ -1145,7 +1149,7 @@ aotest.run=function(testName=null,scenarioName=null){
1145
1149
 
1146
1150
 
1147
1151
  // Function 2, case run one test>all scenarii
1148
- var runOneTestAllScenarii=function(chosenTestParam){
1152
+ const runOneTestAllScenarii=function(chosenTestParam){
1149
1153
 
1150
1154
 
1151
1155
  // We init a new empty test result object :
@@ -1172,7 +1176,7 @@ aotest.run=function(testName=null,scenarioName=null){
1172
1176
  console.log("LOG: Running all test «" + chosenTestParam.name + "» scenarii...");
1173
1177
 
1174
1178
 
1175
- var scenariiListLocal=chosenTestParam.scenariiList;
1179
+ const scenariiListLocal=chosenTestParam.scenariiList;
1176
1180
 
1177
1181
  // // DBG
1178
1182
  // console.log("chosenTestParam",chosenTestParam);
@@ -1210,7 +1214,7 @@ aotest.run=function(testName=null,scenarioName=null){
1210
1214
 
1211
1215
 
1212
1216
  // Function 3, case run all tests>all scenarii
1213
- var runAllTestsAllScenarii=function(){
1217
+ const runAllTestsAllScenarii=function(){
1214
1218
 
1215
1219
  // TRACE
1216
1220
  console.log("LOG: Running all tests...");
@@ -4831,7 +4835,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4831
4835
 
4832
4836
 
4833
4837
 
4834
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (09/12/2022-15:57:10)»*/
4838
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (10/12/2022-03:28:33)»*/
4835
4839
  /*-----------------------------------------------------------------------------*/
4836
4840
  /* ## Utility global methods in a browser (htmljs) client environment.
4837
4841
  *
@@ -4871,6 +4875,7 @@ const isUserMediaAvailable=!!(navigator.mediaDevices && navigator.mediaDevices.g
4871
4875
 
4872
4876
  // Dependances-optionalizing mechanisms :
4873
4877
  if(typeof aotest === "undefined"){
4878
+ // If aotest library is not available, then we replace aotest calls with simple tested function calls :
4874
4879
  aotest=function(testcase,testedFunction){ return testedFunction; };
4875
4880
  // TRACE IF NEEDED
4876
4881
  if(PERFORM_TESTS_ON_LIBRARY) console.log("WARN : aotest library not found, deactivating aotest unit test abilities.");
@@ -12952,7 +12957,7 @@ createOritaMicroClient=function(url, port, isNode=false){
12952
12957
  };
12953
12958
 
12954
12959
 
12955
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (09/12/2022-15:57:10)»*/
12960
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (10/12/2022-03:28:33)»*/
12956
12961
  /*-----------------------------------------------------------------------------*/
12957
12962
 
12958
12963
 
@@ -14180,7 +14185,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14180
14185
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14181
14186
 
14182
14187
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14183
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (09/12/2022-15:57:10)»*/
14188
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (10/12/2022-03:28:33)»*/
14184
14189
  /*-----------------------------------------------------------------------------*/
14185
14190
 
14186
14191
 
@@ -15261,7 +15266,7 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
15261
15266
 
15262
15267
  fs.readFile("./404.html", function(error, fileContent){
15263
15268
  response.writeHead(200, headers);
15264
- response.end(fileContent, "utf-8");
15269
+ response.end(fileContent, "utf-8");
15265
15270
  });
15266
15271
 
15267
15272
  }else {
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.379",
3
+ "version": "0.0.381",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",