@nsshunt/ststestrunner 1.1.128 → 1.1.130
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/ststestrunner.cjs +27 -134
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +27 -134
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir03.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir05.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir07.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir10.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirBase.d.ts +1 -0
- package/types/libmodule/testCaseFhirBase.d.ts.map +1 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1231,6 +1231,17 @@ var TestCaseFhirBase = class {
|
|
|
1231
1231
|
GetClient = async () => {
|
|
1232
1232
|
return this.runnerExecutionWorker.GetClient();
|
|
1233
1233
|
};
|
|
1234
|
+
CheckReturnData = (p1obj, p2obj) => {
|
|
1235
|
+
const p1 = JSON.stringify(p1obj);
|
|
1236
|
+
const p2 = JSON.stringify(p2obj);
|
|
1237
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1238
|
+
this.runner.instrumentData.errorCount++;
|
|
1239
|
+
console.log(chalk.default.red(`CheckReturnData(): Compare return data check failed.`));
|
|
1240
|
+
console.log(p1);
|
|
1241
|
+
console.log(p2);
|
|
1242
|
+
process.exit(1);
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1234
1245
|
};
|
|
1235
1246
|
//#endregion
|
|
1236
1247
|
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
@@ -1333,19 +1344,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1333
1344
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1334
1345
|
delete personRecord.meta;
|
|
1335
1346
|
delete retVal.body.meta;
|
|
1336
|
-
|
|
1337
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1338
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1339
|
-
this.runner.instrumentData.errorCount++;
|
|
1340
|
-
console.log("");
|
|
1341
|
-
console.log(chalk.default.red(` ==> 2.1 ************************************************************************************************`));
|
|
1342
|
-
console.log(p1);
|
|
1343
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1344
|
-
console.log(p2);
|
|
1345
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1346
|
-
console.log("");
|
|
1347
|
-
process.exit(1);
|
|
1348
|
-
}
|
|
1347
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1349
1348
|
return retVal.body;
|
|
1350
1349
|
};
|
|
1351
1350
|
};
|
|
@@ -1363,19 +1362,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1363
1362
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1364
1363
|
delete personRecord.meta;
|
|
1365
1364
|
delete retVal.body.meta;
|
|
1366
|
-
|
|
1367
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1368
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1369
|
-
this.runner.instrumentData.errorCount++;
|
|
1370
|
-
console.log("");
|
|
1371
|
-
console.log(chalk.default.red(` ==> 3.1 ************************************************************************************************`));
|
|
1372
|
-
console.log(p1);
|
|
1373
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1374
|
-
console.log(p2);
|
|
1375
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1376
|
-
console.log("");
|
|
1377
|
-
process.exit(1);
|
|
1378
|
-
}
|
|
1365
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1379
1366
|
return retVal.body;
|
|
1380
1367
|
};
|
|
1381
1368
|
};
|
|
@@ -1396,20 +1383,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1396
1383
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1397
1384
|
delete compPersonRecord.meta;
|
|
1398
1385
|
delete loadedPersonRecorded.meta;
|
|
1399
|
-
|
|
1400
|
-
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1401
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1402
|
-
this.runner.instrumentData.errorCount++;
|
|
1403
|
-
console.log("");
|
|
1404
|
-
console.log(chalk.default.red(` ==> 4.1 ************************************************************************************************`));
|
|
1405
|
-
console.log(p1);
|
|
1406
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1407
|
-
console.log(p2);
|
|
1408
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1409
|
-
console.log("");
|
|
1410
|
-
process.exit(1);
|
|
1411
|
-
return retVal.body;
|
|
1412
|
-
}
|
|
1386
|
+
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
1413
1387
|
const originalPersonRecord = retVal.body;
|
|
1414
1388
|
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1415
1389
|
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
@@ -1419,19 +1393,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1419
1393
|
const updatedRecord = { ...retVal.body };
|
|
1420
1394
|
delete updatedRecord.meta;
|
|
1421
1395
|
delete originalPersonRecord.meta;
|
|
1422
|
-
|
|
1423
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1424
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1425
|
-
this.runner.instrumentData.errorCount++;
|
|
1426
|
-
console.log("");
|
|
1427
|
-
console.log(chalk.default.red(` ==> 4.2 ************************************************************************************************`));
|
|
1428
|
-
console.log(p1);
|
|
1429
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1430
|
-
console.log(p2);
|
|
1431
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1432
|
-
console.log("");
|
|
1433
|
-
process.exit(1);
|
|
1434
|
-
}
|
|
1396
|
+
this.CheckReturnData(compPersonRecord, originalPersonRecord);
|
|
1435
1397
|
return retVal.body;
|
|
1436
1398
|
} else {
|
|
1437
1399
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1456,19 +1418,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
|
1456
1418
|
const updatedRecord = { ...retVal.body };
|
|
1457
1419
|
delete updatedRecord.meta;
|
|
1458
1420
|
delete originalPersonRecord.meta;
|
|
1459
|
-
|
|
1460
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1461
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1462
|
-
this.runner.instrumentData.errorCount++;
|
|
1463
|
-
console.log("");
|
|
1464
|
-
console.log(chalk.default.red(` ==> 5.2 ************************************************************************************************`));
|
|
1465
|
-
console.log(p1);
|
|
1466
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1467
|
-
console.log(p2);
|
|
1468
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1469
|
-
console.log("");
|
|
1470
|
-
process.exit(1);
|
|
1471
|
-
}
|
|
1421
|
+
this.CheckReturnData(updatedRecord, originalPersonRecord);
|
|
1472
1422
|
return retVal.body;
|
|
1473
1423
|
} else {
|
|
1474
1424
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1502,33 +1452,24 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1502
1452
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1503
1453
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1504
1454
|
}
|
|
1455
|
+
const checkRetVal = { ...retVal.body };
|
|
1505
1456
|
const searchRetValCheck = {
|
|
1506
1457
|
resourceType: "Bundle",
|
|
1507
1458
|
type: "searchset",
|
|
1508
|
-
total:
|
|
1459
|
+
total: 0,
|
|
1509
1460
|
link: [{ relation: "self" }],
|
|
1510
|
-
entry: [
|
|
1461
|
+
entry: []
|
|
1511
1462
|
};
|
|
1512
|
-
|
|
1463
|
+
searchRetValCheck.total = checkRetVal.total;
|
|
1464
|
+
searchRetValCheck.entry = [];
|
|
1465
|
+
for (let i = 0; i < checkRetVal.entry.length; i++) searchRetValCheck.entry.push({});
|
|
1513
1466
|
delete checkRetVal.link[0].url;
|
|
1514
1467
|
for (let i = 0; i < checkRetVal.entry.length; i++) {
|
|
1515
1468
|
delete checkRetVal.entry[i].fullUrl;
|
|
1516
1469
|
delete checkRetVal.entry[i].resource;
|
|
1517
1470
|
delete checkRetVal.entry[i].search;
|
|
1518
1471
|
}
|
|
1519
|
-
|
|
1520
|
-
const p2 = JSON.stringify(checkRetVal);
|
|
1521
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1522
|
-
this.runner.instrumentData.errorCount++;
|
|
1523
|
-
console.log("");
|
|
1524
|
-
console.log(chalk.default.red(` ==> 6.1 ************************************************************************************************`));
|
|
1525
|
-
console.log(p1);
|
|
1526
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1527
|
-
console.log(p2);
|
|
1528
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1529
|
-
console.log("");
|
|
1530
|
-
process.exit(1);
|
|
1531
|
-
}
|
|
1472
|
+
this.CheckReturnData(searchRetValCheck, checkRetVal);
|
|
1532
1473
|
return retVal.body;
|
|
1533
1474
|
};
|
|
1534
1475
|
};
|
|
@@ -2204,19 +2145,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
2204
2145
|
personRecord.meta.versionId = "4";
|
|
2205
2146
|
delete personRecord.meta.lastUpdated;
|
|
2206
2147
|
delete retRecordCheck.meta.lastUpdated;
|
|
2207
|
-
|
|
2208
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2209
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2210
|
-
this.runner.instrumentData.errorCount++;
|
|
2211
|
-
console.log("");
|
|
2212
|
-
console.log(chalk.default.red(` ==> 7.1 ************************************************************************************************`));
|
|
2213
|
-
console.log(p1);
|
|
2214
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2215
|
-
console.log(p2);
|
|
2216
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2217
|
-
console.log("");
|
|
2218
|
-
process.exit(1);
|
|
2219
|
-
}
|
|
2148
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2220
2149
|
return retValPatched.body;
|
|
2221
2150
|
};
|
|
2222
2151
|
};
|
|
@@ -2243,19 +2172,7 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2243
2172
|
personRecord.meta.versionId = "5";
|
|
2244
2173
|
delete personRecord.meta.lastUpdated;
|
|
2245
2174
|
delete retRecordCheck.meta.lastUpdated;
|
|
2246
|
-
|
|
2247
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2248
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2249
|
-
this.runner.instrumentData.errorCount++;
|
|
2250
|
-
console.log("");
|
|
2251
|
-
console.log(chalk.default.red(` ==> 8.1 ************************************************************************************************`));
|
|
2252
|
-
console.log(p1);
|
|
2253
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2254
|
-
console.log(p2);
|
|
2255
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2256
|
-
console.log("");
|
|
2257
|
-
process.exit(1);
|
|
2258
|
-
}
|
|
2175
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2259
2176
|
return retValPatched.body;
|
|
2260
2177
|
};
|
|
2261
2178
|
};
|
|
@@ -2280,19 +2197,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2280
2197
|
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2281
2198
|
}]
|
|
2282
2199
|
};
|
|
2283
|
-
|
|
2284
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2285
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2286
|
-
this.runner.instrumentData.errorCount++;
|
|
2287
|
-
console.log("");
|
|
2288
|
-
console.log(chalk.default.red(` ==> 9.1 ************************************************************************************************`));
|
|
2289
|
-
console.log(p1);
|
|
2290
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2291
|
-
console.log(p2);
|
|
2292
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2293
|
-
console.log("");
|
|
2294
|
-
process.exit(1);
|
|
2295
|
-
}
|
|
2200
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2296
2201
|
return retVal.body;
|
|
2297
2202
|
} catch (error) {
|
|
2298
2203
|
if (axios.default.isAxiosError(error)) {
|
|
@@ -2325,19 +2230,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
|
2325
2230
|
delete retVal.body.meta;
|
|
2326
2231
|
delete personRecord.text.div;
|
|
2327
2232
|
delete retVal.body.text.div;
|
|
2328
|
-
|
|
2329
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2330
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2331
|
-
this.runner.instrumentData.errorCount++;
|
|
2332
|
-
console.log("");
|
|
2333
|
-
console.log(chalk.default.red(` ==> 10.1 ************************************************************************************************`));
|
|
2334
|
-
console.log(p1);
|
|
2335
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2336
|
-
console.log(p2);
|
|
2337
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2338
|
-
console.log("");
|
|
2339
|
-
process.exit(1);
|
|
2340
|
-
}
|
|
2233
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
2341
2234
|
return retVal.body;
|
|
2342
2235
|
};
|
|
2343
2236
|
};
|