mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-14 22:09:29 +02:00
chore: Update packet-beta to packet
This commit is contained in:
@@ -28,7 +28,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"
|
||||
|
@@ -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"
|
||||
|
@@ -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(
|
||||
|
@@ -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"
|
||||
|
@@ -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' },
|
||||
|
Reference in New Issue
Block a user