faker
faker copied to clipboard
Make tests compatible with Elixir 1.16 and 1.17
This PR replaces usages of Elixir functions that return random data, allowing us to update the test to work on all supported Elixir versions:
- Replace
Enum.randomwith:rand.uniformonFaker.Random.Test.random_between - Replace
Enum.randomwithrandom_betweenonFaker.Random.Test.random_bytes - Replace
Enum.take_randomandEnum.shufflewithEnum.sort_by(random_uniform)
After this changes the only tests breaking was on Faker.File because of the map ordering changes on OTP 26, also fixed it and updated CI to test on both OTP 26 and 27.
I've added:
- [ ] USAGE.md docs if applicable
- [X] CHANGELOG.md