@nsshunt/ststestrunner 1.1.95 → 1.1.97
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 +11 -0
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +11 -0
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +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/dist/ststestrunner.mjs
CHANGED
|
@@ -1117,6 +1117,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1117
1117
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1118
1118
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1119
1119
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1120
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1120
1121
|
this.runner.instrumentData.requestCount++;
|
|
1121
1122
|
const compPersonRecord = { ...personRecord };
|
|
1122
1123
|
const loadedPersonRecorded = { ...retVal.body };
|
|
@@ -1141,6 +1142,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1141
1142
|
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1142
1143
|
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
|
|
1143
1144
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1145
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1144
1146
|
const updatedRecord = { ...retVal.body };
|
|
1145
1147
|
delete updatedRecord.meta;
|
|
1146
1148
|
delete originalPersonRecord.meta;
|
|
@@ -1177,6 +1179,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
|
1177
1179
|
originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
|
|
1178
1180
|
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
|
|
1179
1181
|
this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
|
|
1182
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1180
1183
|
const updatedRecord = { ...retVal.body };
|
|
1181
1184
|
delete updatedRecord.meta;
|
|
1182
1185
|
delete originalPersonRecord.meta;
|
|
@@ -1220,9 +1223,11 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1220
1223
|
};
|
|
1221
1224
|
retVal = await client.GenericSearchTesting("Person", data);
|
|
1222
1225
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
|
|
1226
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1223
1227
|
} else {
|
|
1224
1228
|
retVal = await client.GetResources(url);
|
|
1225
1229
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1230
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1226
1231
|
}
|
|
1227
1232
|
return retVal.body;
|
|
1228
1233
|
};
|
|
@@ -1885,12 +1890,14 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
1885
1890
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1886
1891
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1887
1892
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1893
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1888
1894
|
const resource = retVal.body;
|
|
1889
1895
|
const observer = fast_json_patch_default.observe(resource);
|
|
1890
1896
|
resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
|
|
1891
1897
|
const patchRecord = fast_json_patch_default.generate(observer);
|
|
1892
1898
|
const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
|
|
1893
1899
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1900
|
+
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1894
1901
|
return retValPatched.body;
|
|
1895
1902
|
};
|
|
1896
1903
|
};
|
|
@@ -1905,10 +1912,12 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
1905
1912
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1906
1913
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1907
1914
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
1915
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1908
1916
|
const resource = retVal.body;
|
|
1909
1917
|
resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
|
|
1910
1918
|
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
|
|
1911
1919
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
1920
|
+
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1912
1921
|
return retValPatched.body;
|
|
1913
1922
|
};
|
|
1914
1923
|
};
|
|
@@ -1924,6 +1933,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
1924
1933
|
if (personRecord.text) try {
|
|
1925
1934
|
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
|
|
1926
1935
|
this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
|
|
1936
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1927
1937
|
return retVal.body;
|
|
1928
1938
|
} catch (error) {
|
|
1929
1939
|
if (axios.isAxiosError(error)) {
|
|
@@ -1951,6 +1961,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
|
1951
1961
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1952
1962
|
const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
|
|
1953
1963
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
|
|
1964
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1954
1965
|
return retVal.body;
|
|
1955
1966
|
};
|
|
1956
1967
|
};
|