Skip to content

Use seed in randomised tests#6287

Merged
Latropos merged 3 commits intomainfrom
acynk/seed-random
Jul 19, 2024
Merged

Use seed in randomised tests#6287
Latropos merged 3 commits intomainfrom
acynk/seed-random

Conversation

@Latropos
Copy link
Contributor

@Latropos Latropos commented Jul 17, 2024

Summary

Unfortunately it is impossible to seed Math.random function, so this code includes custom implementation of pseudorandom number generator.

https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript/47593316#47593316

Test plan

@Latropos Latropos marked this pull request as ready for review July 18, 2024 08:30
@Latropos Latropos added this pull request to the merge queue Jul 19, 2024
Merged via the queue into main with commit 0d551fb Jul 19, 2024
@Latropos Latropos deleted the acynk/seed-random branch July 19, 2024 10:11
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## Summary
Unfortunately it is impossible to seed Math.random function, so this
code includes custom implementation of pseudorandom number generator.


https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript/47593316#47593316

## Test plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants