| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Co-authored-by: Shinigami <[email protected]>
|
|
|
|
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.
|
|
|
|
Fixes typo is jsdoc
|
|
Current status:
- renamed method to datetime
|
|
Current status:
- changed datetime test that checks seeding to not assert something because it does not work
- changed some asserts to strictEqual instead of using .ok(a===b)
- renamed datatype.date to datatype.datetime
|
|
Current status:
- implemented array method and respective tests
- added a few semicolons
- changed test with seeding of datatype.date to only check date, not time
- added test for generating json with set seed
|
|
Current status:
- adding methods for string, json and respective tests
|
|
Current status:
- moved tests with seeding problem back to random.unit
- implemented date method
- added datatype module to seed funtion
- added tests for date method
|
|
Current status:
- moved number(), float(), hexaDecimal(), boolean(), uuid() from random to datatype
- moved respective test from random.unit to datatype.unit
- tests of moved methods in random now check if DeprecationWarning is printed and respective method in datatype module is called
- adapted all lib files that use moved methods (mostly number)
- adapted tests of respective files to spy on the correct method
- adapted README in order to promote usage of method that logs a DeprecationWarning
|
|
|