mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 04:49:44 +02:00
1st version parsing for class diagrams, fetching data from parsing
This commit is contained in:
@@ -6,7 +6,7 @@ describe('class diagram, ', function () {
|
||||
var ex, cd;
|
||||
beforeEach(function () {
|
||||
cd = require('./parser/classDiagram').parser;
|
||||
//cd.yy = require('./classeDb');
|
||||
cd.yy = require('./classDb');
|
||||
});
|
||||
|
||||
it('should handle relation definitions', function () {
|
||||
@@ -105,4 +105,21 @@ class User {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('when fetchiing data an classDiagram graph it', function () {
|
||||
var ex, cd;
|
||||
beforeEach(function () {
|
||||
cd = require('./parser/classDiagram').parser;
|
||||
cd.yy = require('./classDb');
|
||||
cd.yy.clear();
|
||||
});
|
||||
it('should handle relation definitions', function () {
|
||||
var str = `classDiagram
|
||||
Class01 <|-- Class02`;
|
||||
|
||||
cd.parse(str);
|
||||
expect(cd.yy.getClass('Class01').id).toBe('Class01');
|
||||
expect(cd.yy.getClass('Class02').id).toBe('Class02');
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user