🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
import { describe, expect, it, vi } from 'vitest';
import { unreadableVersions } from './skillVersions';
vi.mock('@/store/verify', () => ({ useVerifyStore: vi.fn(), verifySelectors: {} }));
describe('unreadableVersions', () => {
const error = new Error('storage down');
// A failed read has to surface: it must not read as still loading.
it('names a version that failed with nothing to show', () => {
const failed = { error };
expect(unreadableVersions([{ body: '# v1' }, failed])).toEqual([failed]);
});
it('leaves out one still loading', () => {
expect(unreadableVersions([{}])).toEqual([]);
});
it('leaves out one whose text survived a failed refresh', () => {
expect(unreadableVersions([{ body: '', error }])).toEqual([]);
});
});