π€― 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 } from 'vitest';
import { donutLegendCategories, showsDonutTotal } from './donut';
describe('showsDonutTotal', () => {
it('hides the center total for shares of a whole', () => {
expect(showsDonutTotal({ unit: '%' })).toBe(false);
expect(showsDonutTotal({ 'value-format': 'percent' })).toBe(false);
expect(showsDonutTotal({ unit: 'ε
' })).toBe(true);
});
});
describe('donutLegendCategories', () => {
it('names every slice in data order', () => {
const rows = [
{ region: 'εδΈ', share: 45 },
{ region: 'εε', share: 30 },
{ region: 'εε', share: 25 },
];
expect(donutLegendCategories(rows, 'region')).toEqual(['εδΈ', 'εε', 'εε']);
expect(donutLegendCategories(rows, undefined)).toEqual([]);
});
});