Files
vercel__workflow/packages/web-shared/test/event-list-name.test.ts
Karthik Kalyan 4bd533de17 fix(web-shared): shorten workflow-prefixed step names (#3684)
* fix(web-shared): shorten workflow-prefixed step names

* fix(web-shared): shorten event list step names
2026-08-19 17:07:50 -07:00

20 lines
605 B
TypeScript

import type { Event } from '@workflow/world';
import { describe, expect, it } from 'vitest';
import { buildNameMaps } from '../src/components/event-list-view.js';
describe('buildNameMaps', () => {
it('shortens workflow-prefixed step names', () => {
const event = {
eventType: 'step_created',
correlationId: 'step_fetch',
eventData: {
stepName: 'workflow//src/billing.ts//fetchInvoices',
},
} as unknown as Event;
const { correlationNameMap } = buildNameMaps([event], null);
expect(correlationNameMap.get('step_fetch')).toBe('fetchInvoices');
});
});