All files / json-random/src/__tests__ setup.ts

100% Statements 5/5
100% Branches 1/1
100% Functions 2/2
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 71x 47x 314x 314x      
export const resetMathRandom = (seed = 123456789) => {
  Math.random = () => {
    seed = (seed * 48271) % 2147483647;
    return (seed - 1) / 2147483646;
  };
};