⚗️ Add parser tests for architecture and other edge cases encountered

This commit is contained in:
Thomas Di Cizerone
2025-03-23 22:15:37 +01:00
parent 9795b6e089
commit 04d68e7f9a
4 changed files with 295 additions and 166 deletions

View File

@@ -63,6 +63,12 @@ describe('Parsing Branch Statements', () => {
expect(branch.name).toBe('master');
});
it('should parse a branch name starting with numbers', () => {
const result = parse(`gitGraph\n commit\n branch 1.0.1\n`);
const branch = result.value.statements[1] as Branch;
expect(branch.name).toBe('1.0.1');
});
it('should parse a branch with an order property', () => {
const result = parse(`gitGraph\n commit\n branch feature order:1\n`);
const branch = result.value.statements[1] as Branch;