import { describe, expect, it } from 'vitest';

import { ValidationError, Validator } from '../../src/validation/validators.js';

describe('Validator', () => {
  describe('validateSpeed', () => {
    it('accepts the slowest client speed value', () => {
      expect(Validator.validateSpeed(10000)).toBe(10000);
    });

    it('rejects speeds above the client-supported range', () => {
      expect(() => Validator.validateSpeed(10001)).toThrow(ValidationError);
    });
  });
});
