Add unit tests with keywords in notes

This commit is contained in:
Ibrahim Wassouf 2023-07-04 21:07:46 -03:00
parent 49747b314d
commit 099f85f014

View File

@ -264,6 +264,91 @@ class C13["With Città foreign language"]
const str = 'classDiagram\n' + 'note "test"\n'; const str = 'classDiagram\n' + 'note "test"\n';
parser.parse(str); parser.parse(str);
}); });
it('should handle note with "cssClass" in it', function () {
const str = 'classDiagram\n' + 'note "cssClass"\n';
parser.parse(str);
});
it('should handle note with "callback" in it', function () {
const str = 'classDiagram\n' + 'note "callback"\n';
parser.parse(str);
});
it('should handle note with "link" in it', function () {
const str = 'classDiagram\n' + 'note "test"\n';
parser.parse(str);
});
it('should handle note with "click" in it', function () {
const str = 'classDiagram\n' + 'note "click"\n';
parser.parse(str);
});
it('should handle note with "link" in it', function () {
const str = 'classDiagram\n' + 'note "test"\n';
parser.parse(str);
});
it('should handle note with "note" in it', function () {
const str = 'classDiagram\n' + 'note "note"\n';
parser.parse(str);
});
it('should handle note with "note for" in it', function () {
const str = 'classDiagram\n' + 'note "note for"\n';
parser.parse(str);
});
it('should handle note with "<<" in it', function () {
const str = 'classDiagram\n' + 'note "<<"\n';
parser.parse(str);
});
it('should handle note with ">>" in it', function () {
const str = 'classDiagram\n' + 'note ">>"\n';
parser.parse(str);
});
it('should handle note with "href " in it', function () {
const str = 'classDiagram\n' + 'note "href "\n';
parser.parse(str);
});
it('should handle note with "call " in it', function () {
const str = 'classDiagram\n' + 'note "call "\n';
parser.parse(str);
});
it('should handle note with "~" in it', function () {
const str = 'classDiagram\n' + 'note "~"\n';
parser.parse(str);
});
it('should handle note with "``" in it', function () {
const str = 'classDiagram\n' + 'note "``"\n';
parser.parse(str);
});
it('should handle note with "_self" in it', function () {
const str = 'classDiagram\n' + 'note "_self"\n';
parser.parse(str);
});
it('should handle note with "_blank" in it', function () {
const str = 'classDiagram\n' + 'note "_blank"\n';
parser.parse(str);
});
it('should handle note with "_parent" in it', function () {
const str = 'classDiagram\n' + 'note "_parent"\n';
parser.parse(str);
});
it('should handle note with "_top" in it', function () {
const str = 'classDiagram\n' + 'note "_top"\n';
parser.parse(str);
});
}); });
describe('when parsing class defined in brackets', function () { describe('when parsing class defined in brackets', function () {