@nsshunt/ststestrunner 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13032,16 +13032,31 @@ class StartUpDelFhirResources extends TestCaseFhirBase {
13032
13032
  if (retVal) {
13033
13033
  console.log(`Records already exist - going to delete ...`);
13034
13034
  console.log(retVal.length);
13035
- const delRetVal = await this.fhirClient.DeleteResources("Person", retVal, (error) => {
13036
- this.LogErrorMessage(chalk$1.red(`test(POST /stsresource and query using filter): ${error}`));
13037
- });
13038
- if (delRetVal) {
13039
- if (delRetVal.length === 0) {
13035
+ const request2 = {
13036
+ headers: {
13037
+ "x-sts_user_id": "someuser"
13038
+ },
13039
+ params: {},
13040
+ query: {},
13041
+ body: { ...retVal }
13042
+ };
13043
+ const prom = () => {
13044
+ return new Promise((resolve, reject) => {
13045
+ this.socket.emit("deleteFhirResources", "Person", request2, (res2) => {
13046
+ console.log(`socket.emit deleteFhirResources()`);
13047
+ console.log(res2);
13048
+ resolve(res2);
13049
+ });
13050
+ });
13051
+ };
13052
+ const res = await prom();
13053
+ if (res.value) {
13054
+ if (res.value.length === 0) {
13040
13055
  complete = true;
13041
13056
  } else {
13042
13057
  console.log(`Records deleted ...`);
13043
- console.log(delRetVal.length);
13044
- totalRecordsDelete += delRetVal.length;
13058
+ console.log(res.value.length);
13059
+ totalRecordsDelete += res.value.length;
13045
13060
  console.log(chalk$1.red(`total records delete = ${totalRecordsDelete}`));
13046
13061
  }
13047
13062
  } else {