Is it possible to run a parameterized test in just by providing an enum (similar to @EnumSource in junit)?
I am aware of the table expression format for jest.
it.each`
risk
${'GROWTH'}
${'BALANCED'}
`('should show the strategy $strategy', async ({ strategy }: { strategy: Strategy }) => {
and the array style
it.each([
[[1, 41], 42],
[[1, 2, 39], 42],
[[1, 2, NaN], NaN],
[[1, 2, Infinity], Infinity],
])('adds %p expecting %p', (numbers: number[], result: number) => {
expect(calculator('+', numbers)).toEqual(result);
});
but if I try to pass all enum values e.g by means of Object.keys(Strategy) it results in STRATEGY.GROWTH,BALANCED,CONSERVATIVE.