Implement namespace parser

This commit is contained in:
Kazuki Tsunemi
2023-03-09 17:42:38 +09:00
parent c1df62638d
commit 4017bb3c49
3 changed files with 91 additions and 1 deletions

View File

@@ -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 () {