mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Support helpers.request in task runners (#15859)
This commit is contained in:
@@ -119,6 +119,9 @@ export const EXPOSED_RPC_METHODS = [
|
||||
|
||||
// httpRequest(opts: IHttpRequestOptions): Promise<IN8nHttpFullResponse | IN8nHttpResponse>
|
||||
'helpers.httpRequest',
|
||||
|
||||
// (deprecated) request(uriOrObject: string | IRequestOptions, options?: IRequestOptions): Promise<any>;
|
||||
'helpers.request',
|
||||
];
|
||||
|
||||
/** Helpers that exist but that we are not exposing to the Code Node */
|
||||
|
||||
@@ -30,6 +30,7 @@ describe('TaskRequester', () => {
|
||||
['helpers.setBinaryDataBuffer', [{ data: '123' }, Buffer.from('data').toJSON()]],
|
||||
['helpers.binaryToString', [Buffer.from('data').toJSON(), 'utf8']],
|
||||
['helpers.httpRequest', [{ url: 'http://localhost' }]],
|
||||
['helpers.request', [{ url: 'http://localhost' }]],
|
||||
])('should handle %s rpc call', async (methodName, args) => {
|
||||
const executeFunctions = set({}, methodName.split('.'), jest.fn());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user