import type { RawInternship } from "../src/domain/internship.js"; import { type Catalog, emptyCatalog } from "../src/domain/internship.js"; import type { CatalogStore } from "../src/store/catalogStore.js"; export function raw(overrides: Partial = {}): RawInternship { return { title: "Guest Service Intern", organization: "Hotel Alpina", country: "Швейцария", city: "Церматт", field: "Отель", funding: "full", coveredExpenses: "Проживание, питание, перелёт", participationFee: null, language: "russian", languageDetails: "Русский", customerService: true, adjacent: false, confidence: "high", deadline: null, sourceUrl: "https://example.org/alpina", rationale: "Подходит", ...overrides, }; } export class MemoryStore implements CatalogStore { constructor(public catalog: Catalog = emptyCatalog()) {} async load(): Promise { return structuredClone(this.catalog); } async save(catalog: Catalog): Promise { this.catalog = structuredClone(catalog); } }