mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-13 20:39:38 +02:00
chore: Fix unit tests
This commit is contained in:
@@ -814,19 +814,17 @@ describe('given a class diagram with members and methods ', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should handle direct member declaration', function () {
|
it('should handle direct member declaration', function () {
|
||||||
const str = 'classDiagram\n' + 'Car : wheels';
|
parser.parse('classDiagram\n' + 'Car : wheels');
|
||||||
|
const car = classDb.getClass('Car');
|
||||||
parser.parse(str);
|
expect(car.members.length).toBe(1);
|
||||||
expect(classDb.getClasses()).toHaveProperty('Car');
|
expect(car.members[0].id).toBe('wheels');
|
||||||
expect(classDb.getClasses()['Car']['members']).toContain('wheels');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle direct member declaration with type', function () {
|
it('should handle direct member declaration with type', function () {
|
||||||
const str = 'classDiagram\n' + 'Car : int wheels';
|
parser.parse('classDiagram\n' + 'Car : int wheels');
|
||||||
|
const car = classDb.getClass('Car');
|
||||||
parser.parse(str);
|
expect(car.members.length).toBe(1);
|
||||||
expect(classDb.getClasses()).toHaveProperty('Car');
|
expect(car.members[0].id).toBe('int wheels');
|
||||||
expect(classDb.getClasses()['Car']['members']).toContain('int wheels');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle simple member declaration with type', function () {
|
it('should handle simple member declaration with type', function () {
|
||||||
|
Reference in New Issue
Block a user