Merge branch 'develop' into 6584-piechart-zero-negative-values

This commit is contained in:
darshanr0107
2025-07-10 16:36:41 +05:30
committed by GitHub
23 changed files with 1563 additions and 1124 deletions

View File

@@ -3,7 +3,7 @@ import "../common/common";
entry Packet:
NEWLINE*
"packet-beta"
("packet"| "packet-beta")
(
TitleAndAccessibilities
| blocks+=PacketBlock

View File

@@ -2,6 +2,6 @@ import { AbstractMermaidTokenBuilder } from '../common/index.js';
export class PacketTokenBuilder extends AbstractMermaidTokenBuilder {
public constructor() {
super(['packet-beta']);
super(['packet']);
}
}

View File

@@ -11,6 +11,12 @@ describe('packet', () => {
`
\tpacket-beta
`,
`packet`,
` packet `,
`\tpacket\t`,
`
\tpacket
`,
])('should handle regular packet', (context: string) => {
const result = parse(context);
expectNoErrorsOrAlternatives(result);

View File

@@ -32,15 +32,10 @@ const consoleMock = vi.spyOn(console, 'log').mockImplementation(() => undefined)
* @param result - the result `parse` function.
*/
export function expectNoErrorsOrAlternatives(result: ParseResult) {
if (result.lexerErrors.length > 0) {
// console.debug(result.lexerErrors);
}
if (result.parserErrors.length > 0) {
// console.debug(result.parserErrors);
}
expect(result.lexerErrors).toHaveLength(0);
expect(result.parserErrors).toHaveLength(0);
expect.soft(result.lexerErrors).toHaveLength(0);
expect.soft(result.parserErrors).toHaveLength(0);
// To see what the error is, in the logs.
expect(result.lexerErrors[0]).toBeUndefined();
expect(consoleMock).not.toHaveBeenCalled();
consoleMock.mockReset();
}