mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
4bd533de17
* fix(web-shared): shorten workflow-prefixed step names * fix(web-shared): shorten event list step names
20 lines
605 B
TypeScript
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');
|
|
});
|
|
});
|