Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

717 B
Raw Blame
import { describe, it, expect } from 'vitest';
import { UPDATE_CHANNELS, normalizeChannel } from './updateChannel';

describe('updateChannel', () => {
  it('exposes exactly stable + preview', () => {
    expect(UPDATE_CHANNELS).toEqual(['stable', 'preview']);
  });

  it('passes through known channels', () => {
    expect(normalizeChannel('stable')).toBe('stable');
    expect(normalizeChannel('preview')).toBe('preview');
  });

  it('clamps unknown / empty / nullish values to stable', () => {
    expect(normalizeChannel('beta')).toBe('stable');
    expect(normalizeChannel('')).toBe('stable');
    expect(normalizeChannel(undefined)).toBe('stable');
    expect(normalizeChannel(null)).toBe('stable');
  });
});