@nsshunt/ststestrunner 1.1.126 → 1.1.128
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 +68 -10
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +68 -10
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
package/dist/ststestrunner.mjs
CHANGED
|
@@ -1497,9 +1497,33 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1497
1497
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1498
1498
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1499
1499
|
}
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1500
|
+
const searchRetValCheck = {
|
|
1501
|
+
resourceType: "Bundle",
|
|
1502
|
+
type: "searchset",
|
|
1503
|
+
total: 2,
|
|
1504
|
+
link: [{ relation: "self" }],
|
|
1505
|
+
entry: [{}, {}]
|
|
1506
|
+
};
|
|
1507
|
+
const checkRetVal = { ...retVal.body };
|
|
1508
|
+
delete checkRetVal.link[0].url;
|
|
1509
|
+
for (let i = 0; i < checkRetVal.entry.length; i++) {
|
|
1510
|
+
delete checkRetVal.entry[i].fullUrl;
|
|
1511
|
+
delete checkRetVal.entry[i].resource;
|
|
1512
|
+
delete checkRetVal.entry[i].search;
|
|
1513
|
+
}
|
|
1514
|
+
const p1 = JSON.stringify(searchRetValCheck);
|
|
1515
|
+
const p2 = JSON.stringify(checkRetVal);
|
|
1516
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1517
|
+
this.runner.instrumentData.errorCount++;
|
|
1518
|
+
console.log("");
|
|
1519
|
+
console.log(chalk.red(` ==> 6.1 ************************************************************************************************`));
|
|
1520
|
+
console.log(p1);
|
|
1521
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
1522
|
+
console.log(p2);
|
|
1523
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
1524
|
+
console.log("");
|
|
1525
|
+
process.exit(1);
|
|
1526
|
+
}
|
|
1503
1527
|
return retVal.body;
|
|
1504
1528
|
};
|
|
1505
1529
|
};
|
|
@@ -2204,13 +2228,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2204
2228
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2205
2229
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2206
2230
|
const resource = retVal.body;
|
|
2207
|
-
|
|
2231
|
+
const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
|
|
2232
|
+
resource.text.div = patchText;
|
|
2208
2233
|
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
|
|
2209
2234
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
2210
2235
|
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2236
|
+
const retRecordCheck = { ...retValPatched.body };
|
|
2237
|
+
personRecord.text.div = patchText;
|
|
2238
|
+
personRecord.meta.versionId = "5";
|
|
2239
|
+
delete personRecord.meta.lastUpdated;
|
|
2240
|
+
delete retRecordCheck.meta.lastUpdated;
|
|
2241
|
+
const p1 = JSON.stringify(personRecord);
|
|
2242
|
+
const p2 = JSON.stringify(retRecordCheck);
|
|
2243
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
2244
|
+
this.runner.instrumentData.errorCount++;
|
|
2245
|
+
console.log("");
|
|
2246
|
+
console.log(chalk.red(` ==> 8.1 ************************************************************************************************`));
|
|
2247
|
+
console.log(p1);
|
|
2248
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
2249
|
+
console.log(p2);
|
|
2250
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
2251
|
+
console.log("");
|
|
2252
|
+
process.exit(1);
|
|
2253
|
+
}
|
|
2214
2254
|
return retValPatched.body;
|
|
2215
2255
|
};
|
|
2216
2256
|
};
|
|
@@ -2227,9 +2267,27 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2227
2267
|
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
|
|
2228
2268
|
this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
|
|
2229
2269
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2270
|
+
const deletedRetValCheck = {
|
|
2271
|
+
resourceType: "OperationOutcome",
|
|
2272
|
+
issue: [{
|
|
2273
|
+
severity: "error",
|
|
2274
|
+
code: "deleted",
|
|
2275
|
+
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2276
|
+
}]
|
|
2277
|
+
};
|
|
2278
|
+
const p1 = JSON.stringify(deletedRetValCheck);
|
|
2279
|
+
const p2 = JSON.stringify(retVal.body);
|
|
2280
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
2281
|
+
this.runner.instrumentData.errorCount++;
|
|
2282
|
+
console.log("");
|
|
2283
|
+
console.log(chalk.red(` ==> 9.1 ************************************************************************************************`));
|
|
2284
|
+
console.log(p1);
|
|
2285
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
2286
|
+
console.log(p2);
|
|
2287
|
+
console.log(chalk.red(`************************************************************************************************`));
|
|
2288
|
+
console.log("");
|
|
2289
|
+
process.exit(1);
|
|
2290
|
+
}
|
|
2233
2291
|
return retVal.body;
|
|
2234
2292
|
} catch (error) {
|
|
2235
2293
|
if (axios.isAxiosError(error)) {
|