🌐 chore: translate non-English comments to English in integration-test-utilities (#13749)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
LobeHub Bot 2026-04-13 11:01:34 +08:00 committed by GitHub
parent 4feafb3fcb
commit a72ae190a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
// query: 设计思维的困境是什么 / text-embedding-3-small / 1024d
// query: What are the dilemmas of design thinking / text-embedding-3-small / 1024d
export const designThinkingQuery = [
0.07259023189544678, -0.034810926765203476, 0.0220064427703619, 0.013883893378078938,
0.03181556984782219, -0.02168262004852295, -0.010402800515294075, 0.023085853084921837,

View file

@ -1,11 +1,11 @@
/**
*
* Common integration test setup
*/
import { type LobeChatDatabase } from '@/database/type';
import { uuid } from '@/utils/uuid';
/**
*
* Create test context
*/
export const createTestContext = (userId?: string) => ({
jwtPayload: { userId: userId || uuid() },
@ -13,7 +13,7 @@ export const createTestContext = (userId?: string) => ({
});
/**
*
* Create test user
*/
export const createTestUser = async (serverDB: LobeChatDatabase, userId?: string) => {
const id = userId || uuid();
@ -25,7 +25,7 @@ export const createTestUser = async (serverDB: LobeChatDatabase, userId?: string
};
/**
* Agent
* Create test Agent
*/
export const createTestAgent = async (
serverDB: LobeChatDatabase,
@ -41,7 +41,7 @@ export const createTestAgent = async (
};
/**
* Topic
* Create test Topic
*/
export const createTestTopic = async (
serverDB: LobeChatDatabase,
@ -57,12 +57,12 @@ export const createTestTopic = async (
};
/**
*
* Clean up test user and all associated data
*/
export const cleanupTestUser = async (serverDB: LobeChatDatabase, userId: string) => {
const { users } = await import('@/database/schemas');
const { eq } = await import('drizzle-orm');
// 由于外键级联删除,只需删除用户即可
// Due to foreign key cascade deletion, only the user needs to be deleted
await serverDB.delete(users).where(eq(users.id, userId));
};