repo
stringclasses
20 values
path
stringlengths
6
94
lang
stringclasses
5 values
n_chars
int64
81
200k
sha256
stringlengths
64
64
content
stringlengths
81
200k
eren23/non_linear_ai_chat
backend/src/routes/mcp/memories.ts
ts
8,810
350c35c5c22a6ead93f410f0a9b6548164727bb167694abfc4936c7ea4696484
/** * MCP memory endpoints. * Read: /memories, /memories/search (semantic), /memories/:id. * Write: POST /memories — runs the same extraction pipeline as note→memory and * tags the resulting record with `sourceOrigin: 'mcp'`. * * Behaviour was lifted verbatim from the pre-split routes/mcp.ts. */ import {...
eren23/non_linear_ai_chat
backend/src/routes/mcp/flows.ts
ts
21,774
70757d384a70cd3bf891a06dab408f0fd01bf8de4e85b9a2da307975becb7211
/** * MCP flows + flow-groups endpoints. * Read: /flows, /flows/:id, /flows/:id/nodes/:nodeId, /flow-groups, * /flow-groups/:id, /flow-groups/:id/flows. * Write: POST /flows, POST /flow-groups, PATCH /flows/:id/group, * DELETE /flow-groups/:id (require flows:write or mcp:write). * * Behaviour was li...
eren23/non_linear_ai_chat
backend/src/routes/mcp/smartContext.ts
ts
5,916
e72b12a7fa688c821aa7fa734bb7e84df352ac60f4de4bd3e2e557c011bb86e3
/** * MCP "smart context" endpoints — bridge LLM tools that need pre-assembled * context bundles. * * POST /context — relevant memories+facts for a query. * GET /flows/:id/ancestry/:nodeId — ancestry chain for a chat node, available * either as the raw chain or as a chat-message array suitable for LLM input. *...
eren23/non_linear_ai_chat
backend/src/routes/mcp/shared.ts
ts
5,125
b2af9eea301d72471d082349984e40231bb76144f1d6759f7321b5ad1802af72
/** * Shared scaffolding for the per-domain MCP routers (split from the original * monolithic routes/mcp.ts). * * Owns: * - the singleton logger reused across domains, * - the per-domain scope-guard middlewares (read + write), * - the regex-escape helper used by unified search, * - the in-memory cooldown table ...
eren23/non_linear_ai_chat
backend/src/routes/mcp/notes.ts
ts
12,636
58e1b44d77587703c46ebf0272614a14e24a2f7218ac695edd3577202f1f4b23
/** * MCP notes endpoints. * Read: /notes (list, with filters), /notes/graph (visualisation), /notes/search * (text/semantic), /notes/:id (with optional backlinks). * Write: POST /notes (create), PUT /notes/:id (update). * * Behaviour was lifted verbatim from the pre-split routes/mcp.ts. */ import { Route...
eren23/non_linear_ai_chat
backend/src/routes/mcp/reminders.ts
ts
4,065
24886d3092eff176176d6606bd2f85dbfadfb358346506e07e1656f66878d69b
/** * MCP reminders endpoints (read-only). * GET /reminders, GET /reminders/:id. * * Behaviour was lifted verbatim from the pre-split routes/mcp.ts. */ import { Router, Request, Response } from 'express'; import { ObjectId } from 'mongodb'; import { asyncHandler } from '../../middleware/asyncHandler'; import { lo...
eren23/non_linear_ai_chat
backend/src/routes/mcp/index.ts
ts
2,299
39e40f38388200a31a742d9e7ddd838b7d82d5e501d406c45c97401c6f966378
/** * MCP (Model Context Protocol) API aggregator. * Read-only/write access to flows, memories, facts, notes, library, reminders, * commitments, relationships, smart-context, and the knowledge bridge — all * gated behind API token authentication, MCP feature flag, audit logging, and * a baseline `mcp:read` scope. ...
eren23/non_linear_ai_chat
backend/src/routes/mcp/library.ts
ts
10,549
8b9db986e439d9cb547a9dc1bb63c0f19e876f7bcf0f61d2574335923edf7405
/** * MCP library document endpoints (read-only). * GET /library, /library/tags, /library/concepts, /library/:id. * POST /library/search (RAG over library), /library/suggest (context-driven). * * Behaviour was lifted verbatim from the pre-split routes/mcp.ts. */ import { Router, Request, Response } from 'express...
eren23/non_linear_ai_chat
backend/src/routes/mcp/facts.ts
ts
3,707
307bff0314a70f865605d91b1c67f53d43a879eb8404cab03873c9c0b7302898
/** * MCP user-facts endpoints (read-only). * GET /facts, GET /facts/:id. * * Behaviour was lifted verbatim from the pre-split routes/mcp.ts. */ import { Router, Request, Response } from 'express'; import { ObjectId } from 'mongodb'; import { asyncHandler } from '../../middleware/asyncHandler'; import { logError ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/imageTemplates.test.ts
ts
18,487
8616ac172b05029b3763ef2ec1b356c736753fb9cf44c9f6de52cdcdc7a3f123
/** * Integration tests for /templates/image routes. * Tests template CRUD, categories, defaults, import, and validation. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test en...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/flows.version.test.ts
ts
19,082
943416eb91ae51ec48f725c0d947d2f68a602c2f7b762a8099c0aac16af8daba
/** * Tests for version conflict (409) handling in the PUT /flows/:id endpoint. * * Validates optimistic concurrency control: when two clients try to update * the same flow concurrently, the second update is rejected with 409 if the * version it was based on no longer matches the current version in the database. ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/videoGeneration.test.ts
ts
12,896
222184acf48e4f31be68a7f9a96b67f1b6c3ba35cf2736aba6a938cb197dafbb
/** * Integration tests for /video routes (videoGeneration.ts). * Tests video generation SSE, cost estimation, and tier limits. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports proce...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminPrompts.test.ts
ts
16,684
086217a74b59be1a6c0faa6caa992932a21920f8832a6cc4f7ddc224df4389dd
/** * Integration tests for /admin/prompts routes. * Tests prompt CRUD, deprecation, and cache management. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'te...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/audioCapture.test.ts
ts
30,893
261f1857d964b1932e4f3f9ba1293a0ef490db4c77beaa11a9522af00eed68a1
/** * Integration tests for /audio-capture routes. * Tests chunk upload, session management, and transcription pipeline. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test env...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/spending.test.ts
ts
15,994
4119ef444867948af6d0870da872f4b77bf63a5a5f308e2bf3d2a29954c1e594
/** * Integration tests for /api/user/spending routes. * Tests spending status, daily breakdown, flow breakdown, history, by-operation, * by-source, and trends endpoints. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; i...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/generate.enhanced.test.ts
ts
29,839
17a54c67efe74c65df1d95d2b62b3a5d6883c6743f19fb3688119e2a1e6f88e9
/** * Enhanced integration tests for /api/generate endpoint. * Tests the complete request/response cycle with focus on integration aspects. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } fr...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminProfiling.test.ts
ts
18,537
22923edd48d09c4c9418e4bbc54c66943daffeea72b14aadd492fa96f244c8eb
/** * Integration tests for /api/admin/profiling routes. * Tests DB index stats, slow queries, N+1 detection, CPU profiling, * heap snapshots, and profile downloads with admin auth. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from '...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcp.test.ts
ts
24,787
165e1d65f6c8ac39819ed7819f87cc65349006be3d5d9b5bb25d7bca6dc27f7e
/** * Integration tests for /mcp routes. * Tests MCP API token-authenticated endpoints for flows, memories, facts, and search. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set te...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/messages.test.ts
ts
10,360
6cc0d0a5c3d4bbf8efb1b71e6eef8f24496c4996c93597b245273479033f915d
/** * Integration tests for /messages routes. * Tests message history retrieval with validation and sanitization. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environmen...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/localAuth.test.ts
ts
24,824
08387d9bdf66a87af482fd4a2c9c7096836a3c798bdd48683602865ca3b6a8ec
/** * Integration tests for /auth local authentication routes. * Tests registration, login, email verification, password reset, and captcha config. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/flows.test.ts
ts
37,244
155ba4b91795cda3db6847a43f7b4598106c82a7b48daf4b0b92c1aeaa97e870
/** * Integration tests for /api/flows routes. * Tests CRUD operations, sharing, snapshots, authentication, and validation. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; /...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captureSignals.test.ts
ts
62,872
d55188f42807f99aa47f8c363542b923e5f4d64ee357787f5f30fcbfd2b1d3a9
import { beforeEach, describe, expect, it, vi } from 'vitest'; import request from 'supertest'; import express from 'express'; import { ObjectId } from 'mongodb'; const TEST_USER_ID = '507f1f77bcf86cd799439011'; const { mockSettingsFindOne, mockSignalsAggregate, mockSignalsCountDocuments, mockSignalsFindOne, ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/backgroundAgent.test.ts
ts
20,740
5b616c6840b2299f80b35e1ee453a9fc98f469e199c0b985e3ade07e8ec5bf2b
/** * Tests for /agent/background routes — background agent task management. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/auth.test.ts
ts
22,851
eb0c3c7a5cde1fdd538d198aefcceb0b29b9206f3b30ac2149fa11a523cdbb33
/** * Integration tests for /auth routes. * Tests user info, logout, and test-login security gates. * OAuth flow tests are excluded since they require passport strategy setup. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'expres...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/generate.test.ts
ts
16,510
c5e716f712fb81b9131b8b63381cbf3ae688a06e24572387c5d8a2cf455dbdb6
/** * Integration tests for /generate endpoint * Tests the complete request/response cycle including authentication, validation, and streaming */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import type { Request, Response } from 'express'; import { ObjectId } from 'mongodb'; // Mock d...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/models.test.ts
ts
17,981
911b63e580eed0a86a750ac8b9591bce7050dc6c2fc653d6854bcf1fb5bec103
/** * Integration tests for /api/models routes. * Tests model listing, model info, default model, and mark-working endpoints. * * Note: In the source code, GET /models/default is registered AFTER GET /models/:modelId, * which means Express matches "default" as a :modelId parameter. The /models/default route * is ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/documents.test.ts
ts
54,898
497f7aaa08e4d723d0c98bfce6c27d66b0cb2f11a713262cbda85d4b512a8d29
/** * Integration tests for /api/documents routes. * Tests upload, list, search, get, update, delete, attach, detach, * flow/node document retrieval, retry-indexing, validation, and auth enforcement. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminModels.test.ts
ts
23,662
18d1fb85762b512db1f222150f370c0dc394d6ac44a2976502c3c05b877d1984
/** * Integration tests for /admin/models routes. * Tests model CRUD, deprecation, enable/disable, sync, and default model management. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before import...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/notifications.test.ts
ts
14,792
4432def9118268c90d8101ec99f45d90f31e9f33ea23eaf9468c400a8573e0f4
/** * Integration tests for /notifications routes. * Tests notification CRUD, marking as read, and unread count. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/ancestry.test.ts
ts
10,909
e41315ca977ea0735a8095ef664542341e35c8a5bc9865eb603de8dc3a118a66
/** * Integration tests for /ancestry routes. * Tests ancestry chain computation and recursive children finding. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/contentRevisions.test.ts
ts
10,466
f45ed16e1bb192c1bc962d102db4b10c21fef05fb0e64215ad9b59218fec3a61
/** * Integration tests for the /api/revisions content history & restore route * (issue #1130). Verifies owner scoping, restore happy path, and validation. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import express, { Express } from 'express'; import request from 'supertest'; import { ObjectId...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpCanvasScope.test.ts
ts
6,885
756137b3d9cb3963df9e4dbc1b942a78e1e82aaf000f0bdae36664233ceac828
/** * Tests for the MCP Canvas requireCanvasWriteScope middleware. * Verifies that both 'mcp:canvas:write' and 'mcp:write' scopes are accepted. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mon...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpTransport.test.ts
ts
13,578
4991047fa406b66cdabe03b25f1f826b49c3931d1e739fa02c47e0c765cad317
/** * Integration tests for /api/mcp/transport route. * Tests MCP HTTP transport auth, feature gating, scope-based mode selection, * and error handling. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test enviro...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captures.security.test.ts
ts
33,429
19e211c057a2e7c86cdbeeebf3f71f6d971e407ae7606ad87ceb9f2546d58e39
/** * Security audit tests for /api/captures routes. * * Tests SSRF protection (via real validateExternalUrl), XSS sanitization * (via real sanitize-html), authorization bypass, ObjectId injection, * and oversized payload rejection. * * NOTE: validateExternalUrl and sanitize-html are NOT mocked here. * DB, queu...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/commitments.test.ts
ts
34,736
9fc096c78a6afecf90e9a47d18b2a39ddfba4d8f245087771153f53b1bdb4476
/** * Integration tests for /commitments routes. * Tests task CRUD, status transitions, and reminder management. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpEndpoints.test.ts
ts
54,255
28c9031a50a1e2f1d5b035ef5fb1193ed0bc3fcfb4ceedf3ad4a898af9f1e606
/** * Integration tests for untested /mcp route endpoints. * Covers: Notes, Library, Reminders, Relationships, Context, and Ancestry. * * These tests complement mcp.test.ts which covers Flows, Memories, Facts, and Search. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'super...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminPricing.test.ts
ts
1,463
acc5ec259106b4a9b470b0ee69140ccb80b1d8fcfe22c5c946cdf08c3241afaa
import { describe, it, expect, vi, beforeEach } from 'vitest'; // Mock the database module before importing the route vi.mock('../../services/database', () => ({ getDatabase: vi.fn(() => ({ collection: vi.fn(() => ({ createIndex: vi.fn(), updateOne: vi.fn(), countDocuments: vi.fn(() => 0), ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/metrics.test.ts
ts
17,579
5c12a2f234148fb04cf9c457d3b8e659960961e2d63fe69d71b7a8c084041a63
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import express from 'express'; import request from 'supertest'; import metricsRouter from '../metrics'; // --------------------------------------------------------------------------- // Mocks // --------------------------------------------------...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captureSettings.test.ts
ts
34,547
86c77dea3cadc2578729b2efc05992e54aa7e473b5f15db3b2a4c358d795e13d
/** * Integration tests for /api/capture-settings routes. * Tests GET (with default creation) and PUT (upsert) for per-user extension preferences. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment b...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/auth-security.test.ts
ts
19,256
0c0c9c77ae96195e10c53fffc40ed008317cd434caf6220c700c8260b6ae1b1e
/** * Security-focused tests for /auth routes. * * Validates the defense-in-depth gates on the test-login endpoint, * IP restrictions, email domain validation, and authentication guards * on protected endpoints. * * These tests complement auth.test.ts by focusing specifically on * security boundaries rather tha...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminLangfuse.test.ts
ts
11,657
bb19e63cb2540192e001efbc4e15e0cd1117f3b3001ca0406c90c14749351718
/** * Integration tests for /api/admin/langfuse routes. * Tests trace listing, trace detail with latency breakdown, * analysis endpoint, Langfuse-disabled guard, error handling, * and query parameter forwarding. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supe...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/app.integration.test.ts
ts
3,130
d0d53ca210508dcb5745e18180b5bad079b9cedb01fb03e1aaa11a003cf04638
/** * Integration tests for base app routes. * * Tests / and /health and /healthz endpoints with mocked database. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; // Mock calendar to avoid CALENDAR_ENCRYPTION_KEY requirement vi.mock('../../services/calendar', () => ({ encryptCredentials: vi.fn(...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/imageGeneration.test.ts
ts
12,087
f8b2a975c240403afe84e166f4031f376b2f4ebccbc1019036c27ab4cb6573af
/** * Integration tests for /image-generation routes. * Tests the generate-image endpoint with various scenarios. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environmen...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/bugReports.test.ts
ts
15,688
d748979e3fa74b22a5c567bb529a3e956df70f3674168bd496dad5c6423d1049
/** * Integration tests for /bug-reports routes. * Tests CRUD operations, admin-only status updates, and access control. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test env...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/information.ssrf.test.ts
ts
23,569
923ec7f1e481721edd08ba4c630b630a706c4564d1b344406f783ee7654a24a9
/** * SSRF protection integration tests for /information routes. * * These tests verify that SSRF validation is properly enforced at the * API boundary level. Unlike the unit tests in urlValidator.test.ts * which test the validation logic in isolation, these tests confirm: * * 1. POST /information/upload-image r...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captures.test.ts
ts
89,725
12a889a022c21afc1dcdab2ef391bc56369711f7bd57c17259c9b81c33d86372
/** * Integration tests for /api/captures routes. * Tests CRUD operations, batch create, bulk operations, pagination, filtering, * stats, related captures, and processing triggers for browser extension captures. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; impo...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/streaming.abort-backpressure.regression.test.ts
ts
7,220
2b2a76d6a8708b80c133a45f9be646d9b211fb7f0676df0544438375a2e76785
import { describe, it, expect, vi, beforeEach } from 'vitest'; import express, { type NextFunction, type Request, type Response } from 'express'; import request from 'supertest'; vi.mock('../../services/openrouter', () => ({ generateStream: vi.fn(), })); vi.mock('../../config/models', () => ({ isValidModel: vi.fn...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/flows.db.integration.test.ts
ts
4,094
7e6a064ae1f232e81a87e21dc08e03349703c45e35ce042bd1a3db13c29174fb
/** * Database integration tests for flows routes. * * These tests require: * 1. A running MongoDB instance * 2. Seeded test data (npm run seed:test-data) * * Skip by default, run with: RUN_DB_INTEGRATION_TESTS=1 npm test */ import { beforeAll, afterAll, describe, it, expect, vi } from 'vitest'; // Skip entir...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/tags.test.ts
ts
10,699
94735f8e6521688005815a0d9c11f502e5acb759cb6067baa85aef5c6f9e8851
/** * Integration tests for /tags routes. * Tests tag listing, extraction, auto-tagging, and search endpoints. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment b...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/templates.test.ts
ts
16,391
1fccda265950e86fdd2ab0038cca5fe3b37aeed52e545b424b7bc70ce997f199
/** * Integration tests for /templates routes (public, auth-required). * Tests template browsing, category listing, template details, and import. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'm...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/analytics.test.ts
ts
12,414
620853de93f8af15d0fbd93ebf60971704f36bd8d4e71947ffbee39f9e186295
/** * Integration tests for /analytics routes. * Tests admin analytics endpoints (daily stats, model usage, activity patterns, * cost trends, user growth, top users) and user trends endpoint. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Expres...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/admin.test.ts
ts
27,429
75d868f5c90e3809065e0cfd08baba4747de014a0b3868f66000cb807cebe496
/** * Integration tests for /admin routes. * Tests user management, statistics, security violations, cache, and usage analytics. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/userProfile.test.ts
ts
19,438
5ca465bb66cfe0062ae4851654379cf2855e4806f63a7f3dc261a151960262aa
/** * Integration tests for /user-profile routes. * Tests the about-me, search, summary, and context/:category endpoints. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/calendar.test.ts
ts
20,754
00dcaeac5f9560a3ab574e1b9258743539c4392c539574d1242e48a80fb55707
/** * Integration tests for /calendar routes. * Tests OAuth flow, calendar CRUD, preferences, and event management. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captures.screenshot.test.ts
ts
9,691
4b16d75892c76cd82ebda4a13bc07375cce407c5d2b82194d19e9a53644be0d2
/** * Tests for screenshot data processing in /api/captures routes. * * Covers: * - screenshotData schema validation (max size, optional field) * - Screenshot processing triggered for screenshot captures with screenshotData * - Screenshot processing NOT triggered for non-screenshot captures * - fallbackData on p...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/information.batch.test.ts
ts
12,389
a615076397f23fcaca4aac05957f9cd392571a1151e312604414156b3fc10d9f
/** * Tests for POST /information/fetch-urls (batch URL fetch endpoint). */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = '...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/library.uploadUrl.test.ts
ts
9,046
eda155e6c18ab0a4560a9c15d69b7f447bf95e50105e3087d544b67601e93bda
/** * Tests for POST /library/upload-url route. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = 'test-session-secret-that-is-...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpAgent.test.ts
ts
18,992
3353a5fbdb790446652e8f38798896876fb524c56afeaba3d791abaa02e71b88
/** * Integration tests for MCP Agent Control routes. * Tests all 4 endpoints: GET /agent/status, POST /agent/stop, * POST /agent/pause, POST /agent/resume. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/flowMetadata.test.ts
ts
11,703
efd81a069a9c18e83dfa8fc862cdc9d1b3979d7b8e6fd2bf4646395974a09c34
/** * Integration tests for /api/flows (metadata) routes. * Tests flow metadata retrieval, refresh, semantic search, and statistics. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/knowledgeReview.test.ts
ts
13,076
9116302a90bdcaf0665ae21a891c4180f3560e79a15ca7aa3ff953f7c81755a0
/** * Tests for /api/knowledge-review routes. * Covers due cards, stats, review submission, archiving, and input validation. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process....
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpKnowledge.test.ts
ts
22,340
d745d551c9c5775c9e10835b2041198f9589bcdb576ad7e5cbbb496f49861505
/** * Tests for MCP knowledge management routes: * POST /knowledge/compile, POST /knowledge/lint, POST /knowledge/ask, * GET /knowledge/export */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mon...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/capturePhotos.test.ts
ts
18,709
26c3193e8c4e236357183f127b9cdf4dc03e1c898c3e3b53a7253ef533b1764d
/** * Integration-style tests for capture photo endpoints. * * Covers: * - POST /:id/photos/from-urls (~8 cases) * - DELETE /:id/photos/:photoId (~5 cases) * - GET /:id/photos/:photoId/image (~5 cases) * - GET /stats photo aggregation (~2 cases) * * Uses supertest with a minimal Express app wrapping the ca...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/diagramConversion.test.ts
ts
9,354
4f951f9db1cdedb759e3a5ddab4e84b1eedb3788b80a13898c03561377fd19e4
/** * Tests for /diagram-conversion routes. * Validates feature gating, input validation, and success paths. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment bef...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/knowledgeGraph.test.ts
ts
6,757
8e8791920c129c148a0a0f352a913895348e42bd727be915e4b3c1e58c3776f2
/** * Tests for GET /api/knowledge-graph endpoint. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express from 'express'; // Set test environment process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = 'test-session-secret-that-is-at-least-32-characters...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/admin.status.test.ts
ts
14,278
dbc13dba392f0e9d1d9cd94a09fb323424ec6ff529f7beffe8b88528891cc9ea
/** * Tests for admin account status management routes: * PATCH /admin/users/:id/status * GET /admin/users/:id/status-history * GET /admin/audit-log */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express from 'express'; import { ObjectId } from ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/documentChat.test.ts
ts
27,086
d01776d623708202740594c83e2b475720aa172ba9a982ba4699eb4a91ab4725
/** * Integration tests for /api/document-chat routes. * Tests session CRUD, message sending, flow conversion, and document summary endpoints. */ process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = 'test-session-secret-that-is-at-least-32-characters-long'; process.env.CALENDAR_ENCRYPTION_KEY = 'test-calenda...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/crawl.test.ts
ts
15,443
7e4e8e1dd2f51a09cc76f5be454d72a7f951c503e890575955a1e8554e12efde
/** * Integration tests for /api crawl routes (crawl, map, extract). * * Follows the webOps.test.ts pattern: Supertest + vi.mock + createTestApp. * Tests error categorization, input validation, and error sanitization. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/oauth.test.ts
ts
24,502
579487d1636c69aa5dbe15146981eb4bde04ef821814e109ca7d3ae67464b109
/** * Integration tests for the OAuth 2.1 AS endpoints mounted at root. * * Focus: the HTTP contract — status codes, redirect targets, response * headers, JSON shape compliance with RFC 8414 / 7591 / 9728. Unit-level * behavior (PKCE math, JWT mint/verify, refresh rotation race) is * covered by the `services/oaut...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/files.test.ts
ts
36,802
9678ea64db4564b45658ac0f1d83ce512199198b7b434a106299f1b20e3246c8
/** * Integration tests for /api/files routes. * Tests file upload, download, attachment, and management operations. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set t...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpCanvas.test.ts
ts
31,974
96734594189c96a7f88da26a125b6946fb0edbd0a77525f4addb2f263029edcb
/** * Integration tests for MCP Canvas mutation routes. * Tests all 6 endpoints: create node, edit node, delete node, generate response, * connect nodes, and disconnect nodes. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'expres...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/tasks.test.ts
ts
12,997
ecb35cf07ed29558e3654d6a99cfcf7266d107233ead232cf51dd400d6aa6fe4
/** * Integration tests for /tasks routes. * Tests task CRUD operations, filtering, and flow-scoped queries. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment bef...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captures.privacy.test.ts
ts
22,422
081598c6dc94aa9d619f5a587a9f8eb75a9df95af8a497af7c0309ab0a9530ff
/** * Privacy audit tests for /api/captures routes. * * Verifies user data isolation between two test users (A and B), * soft-delete exclusion from all queries, content projection on list * queries, and stats aggregation pipeline userId scoping. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; i...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/systemConfig.test.ts
ts
28,740
068a243bca7e7de8d3d3f1a4f94f5dcc0c8042ce36aac444b820de2e80f68bff
/** * Integration tests for /api/admin/config routes (system behavior configuration). * Tests category listing, item CRUD, history, export, and import operations. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set te...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/information.test.ts
ts
13,671
bd8cf815cc3a4ae5b2eeb485f6a126ba50e94d359c70219792cea0b7a1b050f6
/** * Integration tests for /information routes (init endpoint). * Tests batch initialization, model loading, user preferences, and graceful degradation. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test enviro...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/globalSearch.test.ts
ts
10,232
8f2cae33f1288f9e1792d91437f91e3c5d5bc7c156a4fc7c8e3d6cbf4ae33e38
/** * Integration tests for /api/search/global route. * Tests query validation, parameter passing, error handling, and response shape. */ process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = 'test-session-secret-that-is-at-least-32-characters-long'; process.env.CALENDAR_ENCRYPTION_KEY = 'test-calendar-key-th...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/agentCollaborator.test.ts
ts
8,375
4b83d788b04d92327e23d732e6808d95cbdcc76cc912eab02e37a717721fe40d
/** * Integration tests for /agent routes — admin-only guard. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; process.env.SESSION_SECRET = 'test-sessio...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/webOps.test.ts
ts
17,347
8124b88c21ac3ff991f29f26c74785613669041c5b7f65e3cbad4bb669a08cc7
/** * Integration tests for /web-ops routes. * Tests health check, stats, search, scrape, and batch scrape with error handling. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports proce...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/graph.test.ts
ts
24,491
dd478da37187d402a0c04a4e9c7b623b6abe3f3d3da8753a4fd0902e69bfcc7d
/** * Integration tests for /graph routes. * Tests admin endpoints (health, metrics, benchmarks, cleanup) and * user endpoints (stats, insights, topics, people, flows-by-topic). */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'expr...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/parallelGenerate.test.ts
ts
11,192
383dbd6d854d77af2b6b30c31dc6cf05a4f6b4550e97722172c75cb1ba6271e8
/** * Integration tests for /parallel-generate routes. * Tests SSE streaming validation, cost estimation, and error handling. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/public.test.ts
ts
8,511
e0b8d80d1b835a0f00a7d51022453d8835cfae710ac110d4a30ee0190ad7a24d
/** * Integration tests for /public routes. * Tests the authenticated image proxy endpoint. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; process.en...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/flowGroups.test.ts
ts
20,310
14e5dfb53694a6e4da707793cda6115082606a46054b31f5c8f88c9b34233b51
/** * Integration tests for /flow-groups routes. * Tests CRUD for flow groups, nesting validation, and moving flows between groups. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // S...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/information.moderation.test.ts
ts
12,468
00fe64ea2fe3310754fb0d4140dc0dbfa19bddd52c996729b624e56a547d06c6
/** * Content moderation integration tests for /information image routes. * * Verifies that moderation is enforced on: * - POST /information/upload-image (file upload and URL fetch paths) * - POST /information/extract-image * - POST /information/upload-sketch-png * * Tests moderation enabled + flagged → 403, en...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/library.test.ts
ts
19,744
f0bc6b1872da059a7e6a20bd74aa744cf0d67fa0c1f367547155c64071af0ac2
/** * Integration tests for /library routes. * Tests document CRUD, tags, concepts, suggestions, and search. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test environment bef...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/memories.test.ts
ts
29,996
1705422d23d34819b066e57bbfe6cf02c6dda1d40875771fd7e8b1056aa9ba71
/** * Integration tests for /api/memories routes. * Tests CRUD operations, search, graph, and memory management features. */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/adminTemplates.test.ts
ts
24,167
1b8223de330828a70fef97b6c01eedbeefb5c8958a82e98083fde52932808e50
/** * Integration tests for /admin/templates routes. * Tests template CRUD, category management, and toggle operations. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test envi...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/library.chunks.test.ts
ts
10,915
38ed4afbd813863b123cb980d889d9b82ae416420115894b2250ce7e3a77acd9
/** * Tests for GET /api/library/:id/chunks and semantic chunk search endpoints. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; import libraryRouter from '../library'; // Set test envi...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/capturePhotos.security.test.ts
ts
21,911
bfdf3b6414067cd1e8b4dc7e18a9f66bfd2c8026ebfa319b9e4e08221858c10d
/** * Security-focused tests for capture photo endpoints. * * Covers: * - SVG file rejection (XSS vector prevention) * - MIME type validation vs actual content * - Cross-user isolation (can't access another user's capture photos) * - SSRF protection on URL fetch (blocks private IPs) * - R2 key leak prevention i...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/tools.test.ts
ts
13,022
4c505a87f18ffd154d4c0bf2c0587d8096673d13b06a71092b104356479d02ae
/** * Integration tests for /tools routes. * Tests tool listing, enabling/disabling, and validation. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; p...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpAgentMode.test.ts
ts
19,607
9897dfbb088952b3961d0123fa73c29aa8ab97b9894f35e086edf5ba16fbf802
/** * Integration tests for MCP Agent Mode routes. * * Tests both routers exported from mcpAgentMode.ts: * - mcpAgentModeRouter (token-auth, for MCP clients) * - mcpAgentOwnerRouter (session-auth, for flow owners) */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertes...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/audio.test.ts
ts
10,320
5fe9844edc2506d6ec36c429a69d1b6838dd06238685d62301efd5da62d45985
/** * Integration tests for /transcribe route (audio.ts). * Tests file upload, MIME validation, duration checks, and transcription. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports p...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/rag.test.ts
ts
10,537
6f96f843f9782b654767baef786c130025f2d1f84df6b3635d4cd9b722723c0a
/** * Integration tests for /rag routes. * Tests RAG search endpoint with validation, sanitization, and filter handling. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env....
eren23/non_linear_ai_chat
backend/src/routes/__tests__/capture.test.ts
ts
12,212
8038c50948bf9970d3e615df1f542a9d04de758c605d5cc939a5dcddf7fd9379
/** * Integration tests for /capture routes. * Tests unified capture endpoint with queue/sync processing, validation, and error handling. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imp...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/userLimits.test.ts
ts
8,191
18d543202a108acff3176e323e1a24c061a075585f7ccb94050534aec9f7e40e
/** * Integration tests for /api/user/limits route. * Tests tier info, resource limits, spending status, and agent availability. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports proc...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/telegram.test.ts
ts
10,945
3eadcb94aad54bdc3fff9d3b72e37be6888b83bda5b184c0de6c1911e1d8875d
/** * Integration tests for /api/telegram routes. * Tests webhook handling, account linking, status checking, and unlinking. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; // Set test...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/captures.performance.test.ts
ts
22,758
ed15199bf74ade663dd356b6457c47a9d93ac2a9eee2ac4e3b33874766080ecf
/** * Performance audit tests for /api/captures routes. * * Inspects mock call arguments to verify query efficiency contracts: * pagination mechanics, content exclusion projection, batch write * efficiency, and queue vs sync processing paths. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; impo...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/generate.tracing.test.ts
ts
12,797
3b2be8db7d3c4143001d4536351e21cd5ffd0b84981cc26f7422364f2f219b76
/** * Langfuse traceId propagation tests for the /generate endpoint. * * Verifies that: * - createTrace is called with the correct name and userId * - The resulting traceId is propagated to extractMemoriesFromConversation * - The resulting traceId is propagated to extractChatGraphEntities (7th arg) * - The resul...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/apiTokens.test.ts
ts
13,692
d2843f5dbd492ccfcb48520d1f89438c106aee7b9bdc835a7f0fcde4659fb20e
/** * Integration tests for /api/user/tokens routes. * Tests API token generation, listing, revocation, and scope listing. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.en...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/batch.test.ts
ts
20,454
69547d5f422a5509263957e5ea66510d3349044addcfe49ed6f9c055ef843c02
/** * Integration tests for /batch routes. * Tests batch endpoints for files, messages, and metadata. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; // Set test environment before imports process.env.NODE_ENV = 'test'; ...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/userFacts.test.ts
ts
24,250
3e598772f474a3bcb2c528dfbc71d3eba6fd8b378e95db483186bb21a1873799
/** * Integration tests for /api/user-facts routes. * Tests CRUD operations, query, extraction, refresh, and deduplication endpoints. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Express } from 'express'; import { ObjectId } from 'mongodb'; //...
eren23/non_linear_ai_chat
backend/src/routes/__tests__/mcpWriteRoutes.test.ts
ts
36,035
ef8801c58c3a2d71ec606e1995748ff24a78f4a70875f1c0ed2de80235d49859
/** * Integration tests for MCP write routes: POST /notes, PUT /notes/:id, POST /memories, POST /flows. * Tests MCP API token-authenticated write endpoints for creating and updating resources. */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import request from 'supertest'; import express, { Expres...