mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
Implement namespace parser
This commit is contained in:
@@ -571,6 +571,37 @@ foo()
|
||||
const str = 'classDiagram\n' + 'note "test"\n';
|
||||
parser.parse(str);
|
||||
});
|
||||
|
||||
it('should handle "namespace"', function () {
|
||||
const str = `classDiagram
|
||||
namespace Namespace1 { class Class1 }
|
||||
namespace Namespace2 { class Class1
|
||||
}
|
||||
namespace Namespace3 {
|
||||
class Class1 {
|
||||
int : test
|
||||
string : foo
|
||||
test()
|
||||
foo()
|
||||
}
|
||||
}
|
||||
namespace Namespace4 {
|
||||
class Class1 {
|
||||
int : test
|
||||
string : foo
|
||||
test()
|
||||
foo()
|
||||
}
|
||||
class Class2 {
|
||||
int : test
|
||||
string : foo
|
||||
test()
|
||||
foo()
|
||||
}
|
||||
}
|
||||
`;
|
||||
parser.parse(str);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when fetching data from a classDiagram it', function () {
|
||||
|
Reference in New Issue
Block a user