DEV Community

Discussion on: Be Smart, Write Parameterized Tests with Jest!

Collapse
 
bponomarenko profile image
Borys Ponomarenko

Personally I prefer to use Jest own built-in ‘test.each()’ api for this purpose, as it doesn’t require any additional packages.

Collapse
 
tinesoft profile image
Tine Kondo

Hi Borys,

Thanks for your input! I wasn't aware of the existence of each() right from the it/test objects from Jest Jasmine! Plus, it is exactly the same API! In fact, the feature actually comes from jest-each package: github.com/facebook/jest/tree/mast...

So no need to install the package separately!

I will update the article accordingly.

Cheers!