mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Async functions don't need to explicitly return promises (no-changelog) (#6041)
This commit is contained in:
committed by
GitHub
parent
03be725cef
commit
308a94311f
@@ -14,21 +14,20 @@ jest.mock('../../../v2/transport', () => {
|
||||
...originalModule,
|
||||
googleApiRequest: jest.fn(async (method: string, resource: string) => {
|
||||
if (resource === '/v2/projects/test-project/jobs' && method === 'POST') {
|
||||
return Promise.resolve({
|
||||
return {
|
||||
jobReference: {
|
||||
jobId: 'job_123',
|
||||
},
|
||||
status: {
|
||||
state: 'DONE',
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
if (resource === '/v2/projects/test-project/queries/job_123' && method === 'GET') {
|
||||
return Promise.resolve({});
|
||||
return {};
|
||||
}
|
||||
return Promise.resolve();
|
||||
}),
|
||||
// googleApiRequestAllItems: jest.fn(async () => Promise.resolve()),
|
||||
// googleApiRequestAllItems: jest.fn(async () => {}),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user