mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
🌐 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:
parent
4feafb3fcb
commit
a72ae190a3
2 changed files with 8 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue