mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 16:23:44 +00:00
Add prompt.getPromptGroup.spec.ts covering both the functional contract
and a structural guard against the DocumentDB-incompatible aggregation
shape.
Functional cases (run against mongodb-memory-server):
* returns the group with productionPrompt populated when no tenant
context is active
* returns the group with productionPrompt populated when the active
tenant matches the joined prompt
* clears productionPrompt when the joined prompt belongs to a
different tenant
* returns the group with productionPrompt populated under
SYSTEM_TENANT_ID context (no filtering)
* returns null when the group does not exist
* accepts string _id values (mirrors the route-handler shape)
Structural regression:
* spies on PromptGroup.aggregate and asserts the produced pipeline
contains no $lookup with let or pipeline keys, so the multi-join
form that AWS DocumentDB rejects cannot silently reappear
|
||
|---|---|---|
| .. | ||
| api | ||
| client | ||
| data-provider | ||
| data-schemas | ||