In Ava, extraneous arguments you pass to it are passed to the function.
const testMacro = (input, expectedValue) => {
const actualValue = parse(input);
expect(actualValue).toEqual(expectedValue);
};
test('title', testMacro, 'input', 'expected');
Would something like this be useful for Jest? I know I would use it a lot.
The current behaviour is that the third argument is used as a timeout for async tasks. Changing this would be a breaking change.
Not exactly the same, but you can use similar syntax:
test('title', testMacro.bind(this, 'input', 'expected'));
Yeah we cannot break this right now. We are considering to adopt other test libraries instead of Jasmine and Ava's API is awesome, so I'd love to have a standalone version of that. I'm going to close this issue out for now as we aren't likely to build this.
Most helpful comment
Yeah we cannot break this right now. We are considering to adopt other test libraries instead of Jasmine and Ava's API is awesome, so I'd love to have a standalone version of that. I'm going to close this issue out for now as we aren't likely to build this.