Files
open-gsio/packages/server/__tests__/api-router.test.ts
geoffsee c6e09644e2 **Refactor:** Restructure server package to streamline imports and improve file organization
- Moved `providers`, `services`, `models`, `lib`, and related files to `src` directory within `server` package.
- Adjusted imports across the codebase to reflect the new paths.
- Renamed several `.ts` files for consistency.
- Introduced an `index.ts` in the `ai/providers` package to export all providers.

This improves maintainability and aligns with the project's updated directory structure.
2025-06-24 20:46:15 -04:00

18 lines
445 B
TypeScript

import { describe, it, expect, vi } from 'vitest';
import { createRouter } from '../src/router/router.ts';
// Mock the vike/server module
vi.mock('vike/server', () => ({
renderPage: vi.fn(),
}));
describe('api-router', () => {
// Test that the router is created successfully
it('creates a router', () => {
const router = createRouter();
expect(router).toBeDefined();
expect(typeof router.handle).toBe('function');
});
});