Skip to content

Commit d404655

Browse files
committed
fix: #29 fix coverage
1 parent 1fcb3cf commit d404655

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/app/modules/shared/components/details-fields/details-fields.component.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,31 @@ describe('DetailsFieldsComponent', () => {
8888
const name = 'ngrx';
8989
component.selectedTechnology = ['java', 'javascript'];
9090
component.selectedTechnology.indexOf(name);
91+
length = component.selectedTechnology.length;
9192
component.setTechnology(name);
9293
expect(component.selectedTechnology.length).toBe(3);
9394
});
9495

96+
it('should NOT add a new tag #setTechnology', () => {
97+
const name = 'ngrx';
98+
component.selectedTechnology = [
99+
'java',
100+
'javascript',
101+
'angular',
102+
'angular-ui',
103+
'typescript',
104+
'scss',
105+
'bootstrap',
106+
'jasmine',
107+
'karme',
108+
'github',
109+
];
110+
component.selectedTechnology.indexOf(name);
111+
length = component.selectedTechnology.length;
112+
component.setTechnology(name);
113+
expect(component.selectedTechnology.length).toBe(10);
114+
});
115+
95116
it('should call the removeTag function #setTechnology', () => {
96117
const name = 'java';
97118
component.selectedTechnology = ['java', 'javascript'];

0 commit comments

Comments
 (0)