@nsshunt/ststestrunner 1.1.98 → 1.1.100

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.
@@ -562,9 +562,6 @@ var TestCaseFhirBase = class {
562
562
  get accesssToken() {
563
563
  return this.#accesssToken;
564
564
  }
565
- set accesssToken(token) {
566
- this.#accesssToken = token;
567
- }
568
565
  get runner() {
569
566
  return this.#runner;
570
567
  }
@@ -723,7 +720,12 @@ var TestCaseFhirBase = class {
723
720
  }
724
721
  };
725
722
  ResetAccessToken = () => {
723
+ console.log(chalk.magenta(`************************************************************************* start `));
724
+ console.log(chalk.magenta(`Old Token: ${this.#accesssToken}`));
726
725
  this.#accesssToken = null;
726
+ console.log(chalk.magenta(`New Token: ${this.#accesssToken}`));
727
+ console.log(chalk.magenta(`New Token: ${this.GetAccessToken()}`));
728
+ console.log(chalk.magenta(`************************************************************************* end `));
727
729
  };
728
730
  HandleError = (error) => {
729
731
  this.Error(chalk.red(`TestCaseFhirBase:HandleError(): Error: [${error}]`));
@@ -755,7 +757,10 @@ var TestCaseFhirBase = class {
755
757
  let timeout = void 0;
756
758
  let start = performance.now();
757
759
  try {
758
- if (this.#accesssToken) return this.#accesssToken;
760
+ if (this.#accesssToken) {
761
+ this.Debug(`TestCaseFhirBase:GetAccessToken(): ${this.#accesssToken}`);
762
+ return this.#accesssToken;
763
+ }
759
764
  this.Debug(`TestCaseFhirBase:GetAccessToken(): Getting new access token`);
760
765
  timeout = setTimeout(() => {
761
766
  this.Warning(chalk.magenta(`TestCaseFhirBase:GetAccessToken(): Timeout: [${this._authMaxTimeout}] exceeded for getting access token ...`));
@@ -1043,7 +1048,7 @@ var TestCaseFhir01 = class extends TestCaseFhirQueryBase {
1043
1048
  const __snapshot1 = performance.now();
1044
1049
  await this.GetAccessToken();
1045
1050
  this._CheckOutputLongDurationError(__snapshot1, "await this.GetAccessToken()");
1046
- this.accesssToken = null;
1051
+ this.ResetAccessToken();
1047
1052
  return null;
1048
1053
  };
1049
1054
  };