From c71ba090ad936e9358d714bdcbec13fff29d1a13 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Mon, 22 Jun 2026 20:21:20 +0300 Subject: [PATCH] test: remove unused test --- apps/backend/src/openapi-artifacts.spec.ts | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 apps/backend/src/openapi-artifacts.spec.ts diff --git a/apps/backend/src/openapi-artifacts.spec.ts b/apps/backend/src/openapi-artifacts.spec.ts deleted file mode 100644 index 1d1ca3a..0000000 --- a/apps/backend/src/openapi-artifacts.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { readFileSync } from 'node:fs'; -import { join, resolve } from 'node:path'; - -describe('checked-in OpenAPI frontend types', () => { - const rootDir = resolve(process.cwd(), '../..'); - const frontendTypes = readFileSync(join(rootDir, 'apps/frontend/src/api/types.ts'), 'utf8'); - - const requiredPaths = [ - '/api/v1/auth/register', - '/api/v1/auth/login', - '/api/v1/auth/refresh', - '/api/v1/auth/logout', - '/api/v1/auth/me', - '/api/v1/securities/screener', - '/api/v1/portfolios', - '/api/v1/portfolios/{id}', - '/api/v1/portfolios/{id}/positions', - '/api/v1/portfolios/{id}/positions/{positionId}', - '/api/v1/portfolios/{id}/analytics', - ]; - - it('frontend generated types include current protected domains', () => { - for (const path of requiredPaths) { - expect(frontendTypes).toContain(`'${path}'`); - } - }); - - it('frontend generated types do not leak the local alternate codegen port', () => { - expect(frontendTypes).not.toContain('localhost:3001'); - expect(frontendTypes).not.toContain('3001'); - }); - - it('frontend generated types include typed operations for current protected domains', () => { - const requiredOperations = [ - 'AuthController_register', - 'AuthController_login', - 'AuthController_refresh', - 'AuthController_logout', - 'AuthController_getProfile', - 'AuthController_updateProfile', - 'SecuritiesController_screener', - 'PortfolioController_findAll', - 'PortfolioController_create', - 'PortfolioController_findOne', - 'PortfolioController_update', - 'PortfolioController_remove', - 'PortfolioController_addPosition', - 'PortfolioController_updatePosition', - 'PortfolioController_removePosition', - 'PortfolioController_getAnalytics', - ]; - - for (const operation of requiredOperations) { - expect(frontendTypes).toContain(`operations['${operation}']`); - } - }); -});