@nsshunt/ststestrunner 1.1.129 → 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 +21 -131
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +21 -131
- 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.mjs
CHANGED
|
@@ -1226,6 +1226,17 @@ var TestCaseFhirBase = class {
|
|
|
1226
1226
|
GetClient = async () => {
|
|
1227
1227
|
return this.runnerExecutionWorker.GetClient();
|
|
1228
1228
|
};
|
|
1229
|
+
CheckReturnData = (p1obj, p2obj) => {
|
|
1230
|
+
const p1 = JSON.stringify(p1obj);
|
|
1231
|
+
const p2 = JSON.stringify(p2obj);
|
|
1232
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1233
|
+
this.runner.instrumentData.errorCount++;
|
|
1234
|
+
console.log(chalk.red(`CheckReturnData(): Compare return data check failed.`));
|
|
1235
|
+
console.log(p1);
|
|
1236
|
+
console.log(p2);
|
|
1237
|
+
process.exit(1);
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1229
1240
|
};
|
|
1230
1241
|
//#endregion
|
|
1231
1242
|
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
@@ -1328,19 +1339,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1328
1339
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1329
1340
|
delete personRecord.meta;
|
|
1330
1341
|
delete retVal.body.meta;
|
|
1331
|
-
|
|
1332
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1333
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1334
|
-
this.runner.instrumentData.errorCount++;
|
|
1335
|
-
console.log("");
|
|
1336
|
-
console.log(chalk.red(` ==> 2.1 ************************************************************************************************`));
|
|
1337
|
-
console.log(p1);
|
|
1338
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1339
|
-
console.log(p2);
|
|
1340
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1341
|
-
console.log("");
|
|
1342
|
-
process.exit(1);
|
|
1343
|
-
}
|
|
1342
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1344
1343
|
return retVal.body;
|
|
1345
1344
|
};
|
|
1346
1345
|
};
|
|
@@ -1358,19 +1357,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1358
1357
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1359
1358
|
delete personRecord.meta;
|
|
1360
1359
|
delete retVal.body.meta;
|
|
1361
|
-
|
|
1362
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1363
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1364
|
-
this.runner.instrumentData.errorCount++;
|
|
1365
|
-
console.log("");
|
|
1366
|
-
console.log(chalk.red(` ==> 3.1 ************************************************************************************************`));
|
|
1367
|
-
console.log(p1);
|
|
1368
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1369
|
-
console.log(p2);
|
|
1370
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1371
|
-
console.log("");
|
|
1372
|
-
process.exit(1);
|
|
1373
|
-
}
|
|
1360
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1374
1361
|
return retVal.body;
|
|
1375
1362
|
};
|
|
1376
1363
|
};
|
|
@@ -1391,20 +1378,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1391
1378
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1392
1379
|
delete compPersonRecord.meta;
|
|
1393
1380
|
delete loadedPersonRecorded.meta;
|
|
1394
|
-
|
|
1395
|
-
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1396
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1397
|
-
this.runner.instrumentData.errorCount++;
|
|
1398
|
-
console.log("");
|
|
1399
|
-
console.log(chalk.red(` ==> 4.1 ************************************************************************************************`));
|
|
1400
|
-
console.log(p1);
|
|
1401
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1402
|
-
console.log(p2);
|
|
1403
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1404
|
-
console.log("");
|
|
1405
|
-
process.exit(1);
|
|
1406
|
-
return retVal.body;
|
|
1407
|
-
}
|
|
1381
|
+
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
1408
1382
|
const originalPersonRecord = retVal.body;
|
|
1409
1383
|
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1410
1384
|
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
@@ -1414,19 +1388,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1414
1388
|
const updatedRecord = { ...retVal.body };
|
|
1415
1389
|
delete updatedRecord.meta;
|
|
1416
1390
|
delete originalPersonRecord.meta;
|
|
1417
|
-
|
|
1418
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1419
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1420
|
-
this.runner.instrumentData.errorCount++;
|
|
1421
|
-
console.log("");
|
|
1422
|
-
console.log(chalk.red(` ==> 4.2 ************************************************************************************************`));
|
|
1423
|
-
console.log(p1);
|
|
1424
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1425
|
-
console.log(p2);
|
|
1426
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1427
|
-
console.log("");
|
|
1428
|
-
process.exit(1);
|
|
1429
|
-
}
|
|
1391
|
+
this.CheckReturnData(compPersonRecord, originalPersonRecord);
|
|
1430
1392
|
return retVal.body;
|
|
1431
1393
|
} else {
|
|
1432
1394
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1451,19 +1413,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
|
1451
1413
|
const updatedRecord = { ...retVal.body };
|
|
1452
1414
|
delete updatedRecord.meta;
|
|
1453
1415
|
delete originalPersonRecord.meta;
|
|
1454
|
-
|
|
1455
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1456
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1457
|
-
this.runner.instrumentData.errorCount++;
|
|
1458
|
-
console.log("");
|
|
1459
|
-
console.log(chalk.red(` ==> 5.2 ************************************************************************************************`));
|
|
1460
|
-
console.log(p1);
|
|
1461
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1462
|
-
console.log(p2);
|
|
1463
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1464
|
-
console.log("");
|
|
1465
|
-
process.exit(1);
|
|
1466
|
-
}
|
|
1416
|
+
this.CheckReturnData(updatedRecord, originalPersonRecord);
|
|
1467
1417
|
return retVal.body;
|
|
1468
1418
|
} else {
|
|
1469
1419
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1514,19 +1464,7 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1514
1464
|
delete checkRetVal.entry[i].resource;
|
|
1515
1465
|
delete checkRetVal.entry[i].search;
|
|
1516
1466
|
}
|
|
1517
|
-
|
|
1518
|
-
const p2 = JSON.stringify(checkRetVal);
|
|
1519
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1520
|
-
this.runner.instrumentData.errorCount++;
|
|
1521
|
-
console.log("");
|
|
1522
|
-
console.log(chalk.red(` ==> 6.1 ************************************************************************************************`));
|
|
1523
|
-
console.log(p1);
|
|
1524
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1525
|
-
console.log(p2);
|
|
1526
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1527
|
-
console.log("");
|
|
1528
|
-
process.exit(1);
|
|
1529
|
-
}
|
|
1467
|
+
this.CheckReturnData(searchRetValCheck, checkRetVal);
|
|
1530
1468
|
return retVal.body;
|
|
1531
1469
|
};
|
|
1532
1470
|
};
|
|
@@ -2202,19 +2140,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
2202
2140
|
personRecord.meta.versionId = "4";
|
|
2203
2141
|
delete personRecord.meta.lastUpdated;
|
|
2204
2142
|
delete retRecordCheck.meta.lastUpdated;
|
|
2205
|
-
|
|
2206
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2207
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2208
|
-
this.runner.instrumentData.errorCount++;
|
|
2209
|
-
console.log("");
|
|
2210
|
-
console.log(chalk.red(` ==> 7.1 ************************************************************************************************`));
|
|
2211
|
-
console.log(p1);
|
|
2212
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2213
|
-
console.log(p2);
|
|
2214
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2215
|
-
console.log("");
|
|
2216
|
-
process.exit(1);
|
|
2217
|
-
}
|
|
2143
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2218
2144
|
return retValPatched.body;
|
|
2219
2145
|
};
|
|
2220
2146
|
};
|
|
@@ -2241,19 +2167,7 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2241
2167
|
personRecord.meta.versionId = "5";
|
|
2242
2168
|
delete personRecord.meta.lastUpdated;
|
|
2243
2169
|
delete retRecordCheck.meta.lastUpdated;
|
|
2244
|
-
|
|
2245
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2246
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2247
|
-
this.runner.instrumentData.errorCount++;
|
|
2248
|
-
console.log("");
|
|
2249
|
-
console.log(chalk.red(` ==> 8.1 ************************************************************************************************`));
|
|
2250
|
-
console.log(p1);
|
|
2251
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2252
|
-
console.log(p2);
|
|
2253
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2254
|
-
console.log("");
|
|
2255
|
-
process.exit(1);
|
|
2256
|
-
}
|
|
2170
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2257
2171
|
return retValPatched.body;
|
|
2258
2172
|
};
|
|
2259
2173
|
};
|
|
@@ -2278,19 +2192,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2278
2192
|
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2279
2193
|
}]
|
|
2280
2194
|
};
|
|
2281
|
-
|
|
2282
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2283
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2284
|
-
this.runner.instrumentData.errorCount++;
|
|
2285
|
-
console.log("");
|
|
2286
|
-
console.log(chalk.red(` ==> 9.1 ************************************************************************************************`));
|
|
2287
|
-
console.log(p1);
|
|
2288
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2289
|
-
console.log(p2);
|
|
2290
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2291
|
-
console.log("");
|
|
2292
|
-
process.exit(1);
|
|
2293
|
-
}
|
|
2195
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2294
2196
|
return retVal.body;
|
|
2295
2197
|
} catch (error) {
|
|
2296
2198
|
if (axios.isAxiosError(error)) {
|
|
@@ -2323,19 +2225,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
|
2323
2225
|
delete retVal.body.meta;
|
|
2324
2226
|
delete personRecord.text.div;
|
|
2325
2227
|
delete retVal.body.text.div;
|
|
2326
|
-
|
|
2327
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2328
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2329
|
-
this.runner.instrumentData.errorCount++;
|
|
2330
|
-
console.log("");
|
|
2331
|
-
console.log(chalk.red(` ==> 10.1 ************************************************************************************************`));
|
|
2332
|
-
console.log(p1);
|
|
2333
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2334
|
-
console.log(p2);
|
|
2335
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2336
|
-
console.log("");
|
|
2337
|
-
process.exit(1);
|
|
2338
|
-
}
|
|
2228
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
2339
2229
|
return retVal.body;
|
|
2340
2230
|
};
|
|
2341
2231
|
};
|