unit tests and integration with turbo, chats bug fix

This commit is contained in:
dal 2025-07-07 07:52:15 -06:00
parent 683c842542
commit 42268375f2
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
3 changed files with 19 additions and 1 deletions

View File

@ -28,6 +28,10 @@
"lint": "turbo lint",
"new:package": "bun run scripts/new-package.ts",
"test": "dotenv -e .env -- turbo test",
"test:unit": "dotenv -e .env -- turbo run test:unit",
"test:integration": "dotenv -e .env -- turbo run test:integration",
"test:unit:watch": "dotenv -e .env -- turbo run test:unit:watch",
"test:integration:watch": "dotenv -e .env -- turbo run test:integration:watch",
"test:coverage": "turbo test:coverage",
"test:ui": "vitest --ui",
"test:watch": "turbo test:watch",

View File

@ -207,7 +207,7 @@ export async function updateChat(
// Only add fields that are actually provided (not undefined)
for (const [key, value] of Object.entries(fields)) {
if (value !== undefined && key !== 'id' && key !== 'createdAt' && key !== 'deletedAt') {
updateData[key] = value;
(updateData as Record<string, unknown>)[key] = value;
}
}

View File

@ -19,10 +19,24 @@
"test": {
"dependsOn": ["^build"]
},
"test:unit": {
"dependsOn": ["^build"]
},
"test:integration": {
"dependsOn": ["^build"]
},
"test:watch": {
"cache": false,
"persistent": true
},
"test:unit:watch": {
"cache": false,
"persistent": true
},
"test:integration:watch": {
"cache": false,
"persistent": true
},
"test:coverage": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"]