Skip to content

Commit 2f533a9

Browse files
committed
Added tests in the mapping section
1 parent 6bfe2b1 commit 2f533a9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/app/component/mapping/mapping.component.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@ describe('MappingComponent', () => {
2525
it('should create', () => {
2626
expect(component).toBeTruthy();
2727
});
28+
29+
it('check for table generation', () => {
30+
const HTMLElement: HTMLElement = fixture.nativeElement;
31+
const table = HTMLElement.querySelector('table')!;
32+
expect(table).toBeTruthy();
33+
});
34+
35+
it('check for chip deletion', () => {
36+
component.currentChip = ['row1', 'row2'];
37+
component.removeChip('row1');
38+
const newChipRow = ['row2'];
39+
fixture.detectChanges();
40+
expect(component.currentChip).toEqual(newChipRow);
41+
});
2842
});

0 commit comments

Comments
 (0)