Skip to content

Commit

Permalink
fix the testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakhi Mundhada authored and Rakhi Mundhada committed Aug 23, 2024
1 parent e3d03af commit 6fb98a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions collectors/salesforce/test/utils_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ describe('Unit Tests', function () {
it('Get Object Logs', function (done) {
mockActivityObject = sinon.stub(conn, 'query').callsFake(
function fakeFn(err, result) {
return result(null, { records: [salesforceMock.LOG_EVENT] });
return new Promise(function (resolve, reject) {
return resolve({ records: [salesforceMock.LOG_EVENT] });
});
});
let maxPagesPerInvocation = 5;
let response = {
Expand Down Expand Up @@ -55,7 +57,9 @@ describe('Unit Tests', function () {
it('Get Object Logs with no records', function (done) {
mockActivityObject = sinon.stub(conn, 'query').callsFake(
function fakeFn(err, result) {
return result(null, { records: [] });
return new Promise(function (resolve, reject) {
return resolve({ records: [] });
});
});
let maxPagesPerInvocation = 5;
let response = {
Expand Down

0 comments on commit 6fb98a4

Please sign in to comment.