import { describe, it, expect, vi } from 'vitest';
import getNumber from './getNumber';

describe('getNumber', () => {
  it('returns a number between 0 and 9', () => {
    vi.spyOn(Math, 'random').mockReturnValue(0.42);

    const result = getNumber();

    expect(result).toBe(4);

    vi.restoreAllMocks();
  });
});
