Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

966 B
Raw Blame
import { GENERATE_COMPONENT_VALUE_KEYS } from '@features/generation/core/baseGenerationPolicies';
import { collectGenerationIssueScenarios } from '@features/generation/core/generationIssues.testing';
import { seedArchitectureCapabilities } from '@features/models/core/architectureCapabilities.testing';
import { describe, expect, it } from 'vitest';

import { ISSUE_FIELD_RENDERERS } from './GenerateIssues';

seedArchitectureCapabilities();

describe('ISSUE_FIELD_RENDERERS', () => {
  it('has a renderer for every field an issue points at; component slots render their own', () => {
    const componentSlots = new Set<string>(GENERATE_COMPONENT_VALUE_KEYS);
    const fields = collectGenerationIssueScenarios().flatMap(({ target }) => (target.field ? [target.field] : []));

    expect(fields.length).toBeGreaterThan(0);
    for (const field of fields) {
      expect(field in ISSUE_FIELD_RENDERERS || componentSlots.has(field), field).toBe(true);
    }
  });
});