import { describe, expect, it } from 'vitest'; import { buildRecentProjectRows } from '../src/features/app-shell/model'; describe('最近项目行状态', () => { it('已完成的项目不受其它慢目录的全局刷新状态阻塞', () => { const rows = buildRecentProjectRows( ['C:\\projects\\ready', 'C:\\projects\\slow'], { 'C:\\projects\\ready': { projectPath: 'C:\\projects\\ready', exists: true, isDirectory: true, isGameCreatorProject: true, isGodotProject: false, isCocosProject: false, godotProjectRoot: null, cocosProjectRoot: null, projectName: '可打开项目', recentRunStatus: null, recentRunStopReason: null, }, }, true, ); expect(rows[0]).toMatchObject({ name: '可打开项目', status: '本地项目', canOpen: true, canReveal: true, }); expect(rows[1]).toMatchObject({ status: '检查中', canOpen: false, canReveal: false, }); }); });