From 62870597d6a77322ae6a9a2db80be8b65b05ef9b Mon Sep 17 00:00:00 2001 From: Justin Greywolf Date: Mon, 17 Apr 2023 06:51:08 -0700 Subject: [PATCH] Fixed failing tests --- .../mermaid/src/diagrams/class/classDiagram.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts index 8d8eca0f1..67012b41e 100644 --- a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts +++ b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts @@ -7,6 +7,7 @@ const spyOn = vi.spyOn; describe('given a basic class diagram, ', function () { describe('when parsing class definition', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); it('should handle accTitle and accDescr', function () { @@ -267,6 +268,7 @@ class C13["With Città foreign language"] describe('when parsing class defined in brackets', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); @@ -358,6 +360,7 @@ class C13["With Città foreign language"] describe('when parsing comments', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); @@ -447,6 +450,7 @@ foo() describe('when parsing click statements', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); it('should handle href link', function () { @@ -557,8 +561,8 @@ foo() describe('when parsing annotations', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; - parser.yy.clear(); }); it('should handle class annotations', function () { @@ -621,8 +625,8 @@ foo() describe('given a class diagram with members and methods ', function () { describe('when parsing members', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; - parser.yy.clear(); }); it('should handle simple member declaration', function () { @@ -657,6 +661,7 @@ describe('given a class diagram with members and methods ', function () { describe('when parsing method definition', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); @@ -739,6 +744,7 @@ describe('given a class diagram with members and methods ', function () { describe('given a class diagram with generics, ', function () { describe('when parsing valid generic classes', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); @@ -805,6 +811,7 @@ describe('given a class diagram with generics, ', function () { describe('when parsing invalid generic classes', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; }); @@ -853,6 +860,7 @@ describe('given a class diagram with generics, ', function () { describe('given a class diagram with relationships, ', function () { describe('when parsing basic relationships', function () { beforeEach(function () { + classDb.clear(); parser.yy = classDb; });