aboutsummaryrefslogtreecommitdiff
path: root/test/support/function-helpers.js
AgeCommit message (Collapse)AuthorFilesLines
2022-01-21chore(test): migrate to vitest (#235)Shinigami1-59/+0
2022-01-18feat!: support tree-shaking (#152)Shinigami1-1/+1
2022-01-13chore: format tests (#67)Shinigami1-24/+33
2021-03-24Give each faker instance its own random number generatorCharles Lowell1-1/+1
Currently, every Faker instance shares the same random number generator instance which means that to seed one faker instance is to seed them all. This can result in duplicate data being generated all over the place. This just extracts the public API of the mersenne twister found in `vendor/mersenne.js` and creates a single instance of it per faker. This implementation is a tad sub-optimal since calling `seed()` on a faker instance will result in two redundant calls to `mersenne.init_genrand()`: one in `random.js` and the other in `datatype.js`. It would probably be more DRY to create the mersenne instance once in faker and then pass it into to the `Random` and `Datatype` instances, however, this takes the strategy of the smallest possible API change.
2018-10-27[test] Add `faker.fake` functional tests #386Marak1-0/+50
- Now running all methods through faker.fake - Adds coverage for scope issues #376 - Refactors functional test methods to helper