594 B26 lines
Blame
1import { describe, expect, it } from 'vitest';
2
3import { Packet } from '../src/language/index.js';
4import { expectNoErrorsOrAlternatives, packetParse as parse } from './test-util.js';
5
6describe('packet', () => {
7 it.each([
8 `packet-beta`,
9 ` packet-beta `,
10 `\tpacket-beta\t`,
11 `
12 \tpacket-beta
13 `,
14 `packet`,
15 ` packet `,
16 `\tpacket\t`,
17 `
18 \tpacket
19 `,
20 ])('should handle regular packet', (context: string) => {
21 const result = parse(context);
22 expectNoErrorsOrAlternatives(result);
23 expect(result.value.$type).toBe(Packet.$type);
24 });
25});
26