feat(#1): Set up monorepo scaffold with pnpm workspaces + TurboRepo
Implements the foundational project structure including: - pnpm workspaces configuration - TurboRepo for build orchestration - NestJS 11.1.12 API (apps/api) - Next.js 16.1.6 web app (apps/web) - Shared packages (config, shared, ui) - TypeScript strict mode configuration - ESLint + Prettier setup - Vitest for unit testing (19 passing tests) Fixes #1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
31
apps/api/src/app.controller.test.ts
Normal file
31
apps/api/src/app.controller.test.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { AppService } from "./app.service";
|
||||
import { AppController } from "./app.controller";
|
||||
|
||||
describe("AppController", () => {
|
||||
const appService = new AppService();
|
||||
const controller = new AppController(appService);
|
||||
|
||||
describe("getHello", () => {
|
||||
it('should return "Mosaic Stack API"', () => {
|
||||
expect(controller.getHello()).toBe("Mosaic Stack API");
|
||||
});
|
||||
});
|
||||
|
||||
describe("getHealth", () => {
|
||||
it("should return health status", () => {
|
||||
const result = controller.getHealth();
|
||||
expect(result.success).toBe(true);
|
||||
expect(result.data.status).toBe("healthy");
|
||||
expect(result.data.timestamp).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("AppService", () => {
|
||||
const service = new AppService();
|
||||
|
||||
it('should return "Mosaic Stack API"', () => {
|
||||
expect(service.getHello()).toBe("Mosaic Stack API");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user