Closed allmywant closed 4 years ago
Also, would it be worth having another unit test that checks recipes with different and same sample rates, out of order reliably return a specific recipe?
E.g. We have 5 recipes:
And we check that for decision = 0.15
we always get recipe 3
, for decision = 0.55
we always get recipe 4
, and for decision = 0.65
we get recipe 1
.
Or is there a better way to check that decisions always yield the same recipes?
@kingo55 You're right, I will add a unit test to test this. BTW: I think this pr might has confilcts with Sam's (#37 ), I can wait until Sam's pr was merged, then close this pr and I will create a new one based on Sam's changes.
I've sent another PR, closing this one.
Now maximum calls of getRandom is 3, when recipes has same sampleRate values.