mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			588 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			588 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
 | 
						|
    `,
 | 
						|
    `packet`,
 | 
						|
    `  packet  `,
 | 
						|
    `\tpacket\t`,
 | 
						|
    `
 | 
						|
    \tpacket
 | 
						|
    `,
 | 
						|
  ])('should handle regular packet', (context: string) => {
 | 
						|
    const result = parse(context);
 | 
						|
    expectNoErrorsOrAlternatives(result);
 | 
						|
    expect(result.value.$type).toBe(Packet);
 | 
						|
  });
 | 
						|
});
 |