mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			889 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			889 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { describe, expect, it } from 'vitest';
 | 
						|
 | 
						|
import { Info } from '../src/language/index.js';
 | 
						|
import { expectNoErrorsOrAlternatives, infoParse as parse } from './test-util.js';
 | 
						|
 | 
						|
describe('info', () => {
 | 
						|
  it.each([
 | 
						|
    `info`,
 | 
						|
    `
 | 
						|
    info`,
 | 
						|
    `info
 | 
						|
    `,
 | 
						|
    `
 | 
						|
    info
 | 
						|
    `,
 | 
						|
  ])('should handle empty info', (context: string) => {
 | 
						|
    const result = parse(context);
 | 
						|
    expectNoErrorsOrAlternatives(result);
 | 
						|
    expect(result.value.$type).toBe(Info);
 | 
						|
  });
 | 
						|
 | 
						|
  it.each([
 | 
						|
    `info showInfo`,
 | 
						|
    `info showInfo
 | 
						|
    `,
 | 
						|
    `
 | 
						|
    info showInfo`,
 | 
						|
    `info
 | 
						|
    showInfo`,
 | 
						|
    `info
 | 
						|
    showInfo
 | 
						|
    `,
 | 
						|
    `
 | 
						|
    info
 | 
						|
    showInfo
 | 
						|
    `,
 | 
						|
    `
 | 
						|
    info
 | 
						|
    showInfo`,
 | 
						|
    `
 | 
						|
    info showInfo
 | 
						|
    `,
 | 
						|
  ])('should handle showInfo', (context: string) => {
 | 
						|
    const result = parse(context);
 | 
						|
    expectNoErrorsOrAlternatives(result);
 | 
						|
    expect(result.value.$type).toBe(Info);
 | 
						|
  });
 | 
						|
});
 |