-
Notifications
You must be signed in to change notification settings - Fork 370
Closed
Labels
Description
Describe the bug
run()
doesn't pass the input to the passed function.
This is caused by checking arguments.length
in the run()
implementation. That condition is always falsy.
Lines 200 to 204 in f18da1f
async (meta) => { | |
meta.input = input; | |
const output = arguments.length === 3 ? await func(input) : await func(); | |
meta.output = JSON.stringify(output); | |
return output; |
To Reproduce
it('should run the action', async () => {
const act = async () => 'bar';
const result = await run('action', act, registry);
assert.equal(result, 'bar'); // => OK
});
it('should run the action with input', async () => {
const act = async (input: string) => `${input} bar`;
const result = await run('action', 'foo', act, registry);
assert.equal(result, 'foo bar'); // => ERROR `undefined bar`.
});
Expected behavior
Tests the above should pass.
Screenshots
If applicable, add screenshots to help explain your problem.
Runtime (please complete the following information):
- OS: [e.g. Linux, MacOS]
- Version [e.g. 22]
** Node version
- run
node --version
at paste here
Additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done