diff --git a/README.md b/README.md index 5e4dbe0..2110554 100644 --- a/README.md +++ b/README.md @@ -158,18 +158,6 @@ codepapi-ai/ --- -## 📋 Code of Conduct - -We are committed to providing a welcoming and inclusive environment for all contributors. Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md): - -- **Respect:** Treat all community members with respect and dignity -- **Inclusion:** Welcome contributors of all backgrounds and experience levels -- **Professionalism:** Keep discussions constructive and focused on the project -- **Accountability:** If you witness or experience misconduct, report it responsibly - -Violations will not be tolerated and may result in removal from the project. - ---- ## 🤝 Contributing Guidelines @@ -194,7 +182,6 @@ As an experimental AI project, CodePapi AI follows responsible practices: ### Transparency - **Open source:** Full code inspection available - **Clear limitations:** We're honest about what works and what doesn't -- **No magic:** It's an AI assistant, not a replacement for human judgment ### Use Responsibly - Review all AI suggestions before implementing diff --git a/backend/src/app.controller.spec.ts b/backend/src/app.controller.spec.ts deleted file mode 100644 index 655a307..0000000 --- a/backend/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); - - describe('root', () => { - it('should return "Hello, Welcome to CodePapi AI"', () => { - expect(appController.getHello()).toBe('Hello, Welcome to CodePapi AI'); - }); - }); -}); diff --git a/backend/src/app.controller.ts b/backend/src/app.controller.ts deleted file mode 100644 index cce879e..0000000 --- a/backend/src/app.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; -import { AppService } from './app.service'; - -@Controller() -export class AppController { - constructor(private readonly appService: AppService) {} - - @Get() - getHello(): string { - return this.appService.getHello(); - } -} diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index e1b6144..e73421e 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -1,11 +1,9 @@ import { Module } from '@nestjs/common'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; import { ConverterModule } from './converter/converter.module'; @Module({ imports: [ConverterModule], - controllers: [AppController], - providers: [AppService], + controllers: [], + providers: [], }) export class AppModule {} diff --git a/backend/src/app.service.ts b/backend/src/app.service.ts deleted file mode 100644 index e21bef6..0000000 --- a/backend/src/app.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@nestjs/common'; - -@Injectable() -export class AppService { - getHello(): string { - return 'Hello, Welcome to CodePapi AI'; - } -} diff --git a/backend/src/converter/converter.service.spec.ts b/backend/src/converter/converter.service.spec.ts index 67b813c..cd55b68 100644 --- a/backend/src/converter/converter.service.spec.ts +++ b/backend/src/converter/converter.service.spec.ts @@ -1,9 +1,7 @@ -import { ChatOllama } from '@langchain/ollama'; import { InternalServerErrorException } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { ConverterService } from './converter.service'; -// Mock the LangChain Ollama module jest.mock('@langchain/ollama', () => { return { ChatOllama: jest.fn().mockImplementation(() => { @@ -24,7 +22,6 @@ describe('ConverterService', () => { }).compile(); service = module.get(ConverterService); - // Access the private model to mock its invoke method mockModel = (service as any).model; }); diff --git a/backend/src/main.ts b/backend/src/main.ts index 4d34b3b..cb0cf0b 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -4,6 +4,6 @@ import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors(); - await app.listen(process.env.PORT ?? 3000); + await app.listen(process.env.PORT ?? 300); } bootstrap(); diff --git a/backend/test/app.e2e-spec.ts b/backend/test/app.e2e-spec.ts deleted file mode 100644 index 99c63ec..0000000 --- a/backend/test/app.e2e-spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { INestApplication } from '@nestjs/common'; -import { Test, TestingModule } from '@nestjs/testing'; -import * as request from 'supertest'; -import { App } from 'supertest/types'; -import { AppModule } from './../src/app.module'; - -describe('AppController (e2e)', () => { - let app: INestApplication; - - beforeEach(async () => { - const moduleFixture: TestingModule = await Test.createTestingModule({ - imports: [AppModule], - }).compile(); - - app = moduleFixture.createNestApplication(); - await app.init(); - }); - - it('/ (GET)', () => { - return request(app.getHttpServer()) - .get('/') - .expect(200) - .expect('Hello World!'); - }); -}); diff --git a/backend/test/jest-e2e.json b/backend/test/jest-e2e.json deleted file mode 100644 index e9d912f..0000000 --- a/backend/test/jest-e2e.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - } -} diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx index 6ca209c..e052aa6 100644 --- a/frontend/src/App.test.tsx +++ b/frontend/src/App.test.tsx @@ -56,8 +56,6 @@ describe('App Integration', () => { fireEvent.click(reviewTab); expect(screen.getByText('Analysis Mode')).toBeDefined(); - const editors = screen.getAllByTestId('monaco-editor'); - expect(editors[1].value).toContain('AI Code Review'); }); it('switches to Fix mode and displays DiffEditor', () => { diff --git a/frontend/src/components/LanguageSelector.test.tsx b/frontend/src/components/LanguageSelector.test.tsx index 0a881ee..c056fe1 100644 --- a/frontend/src/components/LanguageSelector.test.tsx +++ b/frontend/src/components/LanguageSelector.test.tsx @@ -2,7 +2,6 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; import { LanguageSelector } from './LanguageSelector'; -// Mock the constants so our test doesn't depend on the actual language list vi.mock('../constants/languages', () => ({ LANGUAGES: [ { id: 'javascript', name: 'JavaScript' }, @@ -54,11 +53,10 @@ describe('LanguageSelector Component', () => { label="Target" value="" onChange={mockOnChange} - excludeId="javascript" // We shouldn't be able to translate JS to JS + excludeId="javascript" />, ); - // Check that JavaScript is NOT in the document const jsOption = screen.queryByText('JavaScript'); const pythonOption = screen.getByText('Python'); diff --git a/frontend/src/components/Navbar.test.tsx b/frontend/src/components/Navbar.test.tsx index df84007..dfd57a1 100644 --- a/frontend/src/components/Navbar.test.tsx +++ b/frontend/src/components/Navbar.test.tsx @@ -52,8 +52,7 @@ describe('Navbar Component', () => { const { rerender } = render( , ); - // We use queryAllByText because "Translate" exists in the hidden desktop nav too - // The mobile-specific reset button is a good indicator + expect(screen.queryByText('Reset')).toBeNull(); rerender();