(seed, length = 10)
| 5 | const { createSeededGenerator, kMaxRandomSeed } = require('internal/test_runner/utils'); |
| 6 | |
| 7 | function sequence(seed, length = 10) { |
| 8 | const random = createSeededGenerator(seed); |
| 9 | const values = []; |
| 10 | for (let i = 0; i < length; i++) { |
| 11 | values.push(random()); |
| 12 | } |
| 13 | return values; |
| 14 | } |
| 15 | |
| 16 | // The same seed must always produce the same sequence so that |
| 17 | // --test-random-seed reproduces a randomized test order across runs. |
no test coverage detected