Skip to content

Commit e483b21

Browse files
authored
test(Filtering): Clear svgContainer. (#9222) (#9244)
1 parent 1774173 commit e483b21

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

projects/igniteui-angular/src/lib/test-utils/configure-suite.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ export const configureTestSuite = () => {
2626
}
2727
};
2828

29+
/** Clear the svg tags from the svgContainer created by the IconService
30+
to avoid increasing their count to over 10000. */
31+
const clearSVGContainer = () => {
32+
document.querySelectorAll('svg').forEach((tag) => tag.remove());
33+
};
34+
2935
afterEach(() => {
36+
clearSVGContainer();
3037
const testBedApi: any = getTestBed();
3138
testBedApi._activeFixtures.forEach((fixture: ComponentFixture<any>) => {
3239
try {

0 commit comments

Comments
 (0)