sr-npm 1.7.396 → 1.7.397
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/package.json
CHANGED
|
@@ -34,10 +34,14 @@ describe('Job details fetch from SR API Tests', () => {
|
|
|
34
34
|
|
|
35
35
|
describe('fetchPositionsFromSRAPI error handling', () => {
|
|
36
36
|
test('should return 0 positions if invalid companyId is found', async () => {
|
|
37
|
+
try{
|
|
37
38
|
const requestBody = `fetchPositionsFromSRAPI('invalid_company_id');`;
|
|
38
|
-
|
|
39
|
-
expect(
|
|
40
|
-
|
|
39
|
+
response = await executeApiRequest(requestBody);
|
|
40
|
+
expect(response.status).not.toBe(500);
|
|
41
|
+
}catch(error){
|
|
42
|
+
console.log(error);
|
|
43
|
+
expect(error.message).toBe('Request failed with status code 500');
|
|
44
|
+
}
|
|
41
45
|
});
|
|
42
46
|
|
|
43
47
|
test('throw error when bad request', async () => {
|