chore: Update packet-beta to packet

This commit is contained in:
Sidharth Vinod
2025-07-10 00:41:02 +05:30
parent ca2eca58c9
commit 2715ddb338
5 changed files with 9 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ export default {
code: `---
title: "TCP Packet"
---
packet-beta
packet
0-15: "Source Port"
16-31: "Destination Port"
32-63: "Sequence Number"

View File

@@ -73,7 +73,7 @@ describe('packet diagrams', () => {
});
it('should handle bit counts', async () => {
const str = `packet-beta
const str = `packet
+8: "byte"
+16: "word"
`;
@@ -99,7 +99,7 @@ describe('packet diagrams', () => {
});
it('should handle bit counts with bit or bits', async () => {
const str = `packet-beta
const str = `packet
+8: "byte"
+16: "word"
`;
@@ -211,7 +211,7 @@ describe('packet diagrams', () => {
});
it('should throw error if numbers are not continuous with bit counts', async () => {
const str = `packet-beta
const str = `packet
+16: "test"
18-20: "error"
`;
@@ -231,7 +231,7 @@ describe('packet diagrams', () => {
});
it('should throw error if numbers are not continuous for single packets with bit counts', async () => {
const str = `packet-beta
const str = `packet
+16: "test"
18: "error"
`;
@@ -262,7 +262,7 @@ describe('packet diagrams', () => {
});
it('should throw error if bit count is 0', async () => {
const str = `packet-beta
const str = `packet
+0: "test"
`;
await expect(parser.parse(str)).rejects.toThrowErrorMatchingInlineSnapshot(

View File

@@ -22,7 +22,7 @@ start-end: "Block name" %% Multi-bit blocks
Using start and end bit counts can be difficult, especially when modifying a design. For this we add a bit count field, which starts from the end of the previous field automagically. Use `+<count>` to set the number of bits, thus:
```
packet-beta
packet
+1: "Block name" %% Single-bit block
+8: "Block name" %% 8-bit block
9-15: "Manually set start and end, it's fine to mix and match"

View File

@@ -794,7 +794,7 @@ graph TD;A--x|text including URL space|B;`)
{ textDiagramType: 'gantt', expectedType: 'gantt' },
{ textDiagramType: 'journey', expectedType: 'journey' },
{ textDiagramType: 'pie', expectedType: 'pie' },
{ textDiagramType: 'packet-beta', expectedType: 'packet' },
{ textDiagramType: 'packet', expectedType: 'packet' },
{ textDiagramType: 'packet', expectedType: 'packet' },
{ textDiagramType: 'xychart-beta', expectedType: 'xychart' },
{ textDiagramType: 'requirementDiagram', expectedType: 'requirement' },