UNPKG

react-archer

Version:

Draw arrows between DOM elements in React

13 lines (11 loc) 254 B
let fakeRandom = 0; beforeEach(() => { jest.spyOn(global.Math, 'random').mockImplementation(() => { fakeRandom += 0.00001; return fakeRandom; }); }); afterEach(() => { fakeRandom = 0; jest.spyOn(global.Math, 'random').mockRestore(); });