Files
wehub-resource-sync 070959e133
landing-page-staging / Deploy landing page to staging (push) Has been skipped
landing-page-ci / Validate landing page (push) Failing after 4s
visual-baseline / Capture visual baselines (push) Has been cancelled
bake-plugin-previews / Bake plugin previews (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:00:47 +08:00

34 lines
1.5 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { supportedModels } from '../../src/components/NewProjectPanel';
import { AUDIO_MODELS_BY_KIND, IMAGE_MODELS, VIDEO_MODELS } from '../../src/media/models';
describe('NewProjectPanel image provider visibility', () => {
it('shows Nano Banana in supported image models', () => {
const models = supportedModels('image', IMAGE_MODELS);
expect(models.some((model) => model.provider === 'nanobanana')).toBe(true);
expect(models.some((model) => model.id === 'gemini-3.1-flash-image-preview')).toBe(true);
});
it('shows ElevenLabs speech models in supported audio models', () => {
const models = supportedModels('audio', AUDIO_MODELS_BY_KIND.speech);
expect(models.some((model) => model.provider === 'elevenlabs')).toBe(true);
expect(models.some((model) => model.id === 'elevenlabs-v3')).toBe(true);
});
it('shows ElevenLabs sound effects models in supported audio models', () => {
const models = supportedModels('audio', AUDIO_MODELS_BY_KIND.sfx);
expect(models.some((model) => model.id === 'elevenlabs-sfx')).toBe(true);
});
it('shows OpenRouter in supported image models', () => {
const models = supportedModels('image', IMAGE_MODELS);
expect(models.some((model) => model.provider === 'openrouter')).toBe(true);
});
it('shows OpenRouter in supported video models', () => {
const models = supportedModels('video', VIDEO_MODELS);
expect(models.some((model) => model.provider === 'openrouter')).toBe(true);
});
});