factory-girl
factory-girl copied to clipboard
Provide a seed to Chance for repeatability
Is it possible to provide a seed to the factory so that running factory.chance
will give repeatable results?
The Chance documentation says that a seed can be provided to Chance using new Chance(mySeed)
but I'm not sure if there is a way to pass the seed to the instance of Chance that factory-girl uses.
Unfortunately, new Chance()
appears to be hardcoded and no configurable seed is being provided.
https://github.com/aexmachina/factory-girl/blob/master/src/generators/ChanceGenerator.js#L5