sr-npm 1.7.394 → 1.7.396
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.
|
@@ -32,11 +32,13 @@ async function fetchPositionsFromSRAPI(companyID=undefined) {
|
|
|
32
32
|
let totalFound = 0;
|
|
33
33
|
let page = 0;
|
|
34
34
|
const MAX_PAGES = 30 // Safety limit to prevent infinite loops
|
|
35
|
+
console.log('companyID =', companyID);
|
|
35
36
|
let companyId=companyID
|
|
36
37
|
if(!companyID)
|
|
37
38
|
{
|
|
38
39
|
companyId = await getCompanyIdFromCMS();
|
|
39
40
|
}
|
|
41
|
+
console.log('companyId =', companyId);
|
|
40
42
|
console.log('Starting to fetch all positions with pagination...');
|
|
41
43
|
let offset=0;
|
|
42
44
|
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ 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
|
-
const requestBody = `fetchPositionsFromSRAPI(invalid_company_id);`;
|
|
37
|
+
const requestBody = `fetchPositionsFromSRAPI('invalid_company_id');`;
|
|
38
38
|
positions = await executeApiRequest(requestBody);
|
|
39
39
|
expect(positions.data.result.totalFound).toBe(0);
|
|
40
40
|
expect(positions.data.result.content.length).toBe(0);
|