Initial commit: Brachnha Insight project setup
- Next.js 14+ with App Router and TypeScript - Tailwind CSS and ShadCN UI styling - Zustand state management - Dexie.js for IndexedDB (local-first data) - Auth.js v5 for authentication - BMAD framework integration Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
24
tests/support/factories/provider.factory.ts
Normal file
24
tests/support/factories/provider.factory.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
|
||||
export interface ProviderConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
baseUrl: string;
|
||||
apiKey: string;
|
||||
modelId: string;
|
||||
}
|
||||
|
||||
export const createProviderConfig = (overrides: Partial<ProviderConfig> = {}): ProviderConfig => {
|
||||
return {
|
||||
id: faker.string.uuid(),
|
||||
name: faker.company.name() + ' AI',
|
||||
baseUrl: faker.internet.url(),
|
||||
apiKey: 'sk-' + faker.string.alphanumeric(20),
|
||||
modelId: faker.helpers.arrayElement(['gpt-4', 'claude-3', 'deepseek-chat']),
|
||||
...overrides,
|
||||
};
|
||||
};
|
||||
|
||||
export const createProviderConfigs = (count: number): ProviderConfig[] => {
|
||||
return Array.from({ length: count }, () => createProviderConfig());
|
||||
};
|
||||
Reference in New Issue
Block a user