Skip to content

Commit a912865

Browse files
author
Abigail Cabascango
committed
refactor: TTA-115 increase test coverage in directives
1 parent 5f65148 commit a912865

File tree

5 files changed

+57
-1
lines changed

5 files changed

+57
-1
lines changed

src/app/modules/customer-management/components/projects-type/services/project-type.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { HttpClient, HttpParams } from '@angular/common/http';
33
import { Observable } from 'rxjs';
4-
import { map, catchError } from 'rxjs/operators';
54
import { environment } from '../../../../../../environments/environment';
65
import { ProjectType } from '../../../../shared/models';
76

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { ConnectionDirective } from './connection.directive';
3+
4+
describe('ConnectionDirective', () => {
5+
beforeEach(() => {
6+
TestBed.configureTestingModule({
7+
declarations: [ConnectionDirective]
8+
});
9+
});
10+
11+
it('should create an instance', () => {
12+
const directive = new ConnectionDirective('slowSrc', 'fastSrc', 'offlineSrc', undefined);
13+
expect(directive).toBeTruthy();
14+
});
15+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { FastDirective } from './fast.directive';
3+
4+
describe('FastDirective', () => {
5+
beforeEach(() => {
6+
TestBed.configureTestingModule({
7+
declarations: [FastDirective]
8+
});
9+
});
10+
it('should create an instance', () => {
11+
const directive = new FastDirective(undefined);
12+
expect(directive).toBeTruthy();
13+
});
14+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { OfflineDirective } from './offline.directive';
3+
4+
describe('FastDirective', () => {
5+
beforeEach(() => {
6+
TestBed.configureTestingModule({
7+
declarations: [OfflineDirective]
8+
});
9+
});
10+
it('should create an instance', () => {
11+
const directive = new OfflineDirective(undefined);
12+
expect(directive).toBeTruthy();
13+
});
14+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { TestBed } from '@angular/core/testing';
2+
import { SlowDirective } from './slow.directive';
3+
4+
describe('FastDirective', () => {
5+
beforeEach(() => {
6+
TestBed.configureTestingModule({
7+
declarations: [SlowDirective]
8+
});
9+
});
10+
it('should create an instance', () => {
11+
const directive = new SlowDirective(undefined);
12+
expect(directive).toBeTruthy();
13+
});
14+
});

0 commit comments

Comments
 (0)