mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
20 lines
512 B
TypeScript
20 lines
512 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { Packet } from '../src/language/index.js';
|
|
import { expectNoErrorsOrAlternatives, packetParse as parse } from './test-util.js';
|
|
|
|
describe('packet', () => {
|
|
it.each([
|
|
`packet-beta`,
|
|
` packet-beta `,
|
|
`\tpacket-beta\t`,
|
|
`
|
|
\tpacket-beta
|
|
`,
|
|
])('should handle regular packet', (context: string) => {
|
|
const result = parse(context);
|
|
expectNoErrorsOrAlternatives(result);
|
|
expect(result.value.$type).toBe(Packet);
|
|
});
|
|
});
|