test: Cover Every Palette Slot in Repeatable Samples

This commit is contained in:
Lia 2026-10-03 15:35:50 +00:00 • committed by Danny Avila
parent 37df3c1146
commit 9dfdea13cb

View file

@ -57,7 +57,7 @@ describe('PixelCard palette', () => {
.spyOn(HTMLElement.prototype, 'getBoundingClientRect')
.mockReturnValue({ width: 200, height: 200 } as DOMRect);
let sample = 0;
jest.spyOn(Math, 'random').mockImplementation(() => ((sample++ % 3) + 0.5) / 3);
jest.spyOn(Math, 'random').mockImplementation(() => ((sample++ % 7) + 0.5) / 7);
render(<PixelCard progress={1} />);
await waitFor(() =>