Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: TTA-115 increase test coverage in directives
  • Loading branch information
Abigail Cabascango committed Oct 6, 2022
commit a912865b56d66d5c226a234fea646ecf4affa623
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { Observable } from 'rxjs';
import { Observable } from 'rxjs';

creo q esa linea en blanco estaba bien porque separa las importaciones externas de los modulos internos

import { map, catchError } from 'rxjs/operators';
import { environment } from '../../../../../../environments/environment';
import { ProjectType } from '../../../../shared/models';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { TestBed } from '@angular/core/testing';
import { ConnectionDirective } from './connection.directive';

describe('ConnectionDirective', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [ConnectionDirective]
});
});

it('should create an instance', () => {
const directive = new ConnectionDirective('slowSrc', 'fastSrc', 'offlineSrc', undefined);
expect(directive).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { TestBed } from '@angular/core/testing';
import { FastDirective } from './fast.directive';

describe('FastDirective', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [FastDirective]
});
});
it('should create an instance', () => {
const directive = new FastDirective(undefined);
expect(directive).toBeTruthy();
});
Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('should create an instance', () => {
const directive = new FastDirective(undefined);
expect(directive).toBeTruthy();
});
it('should create an instance', () => {
const directive = new FastDirective(undefined);
expect(directive).toBeTruthy();
});

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { TestBed } from '@angular/core/testing';
import { OfflineDirective } from './offline.directive';

describe('FastDirective', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [OfflineDirective]
});
});
it('should create an instance', () => {
const directive = new OfflineDirective(undefined);
expect(directive).toBeTruthy();
});
Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('should create an instance', () => {
const directive = new OfflineDirective(undefined);
expect(directive).toBeTruthy();
});
it('should create an instance', () => {
const directive = new OfflineDirective(undefined);
expect(directive).toBeTruthy();
});

});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { TestBed } from '@angular/core/testing';
import { SlowDirective } from './slow.directive';

describe('FastDirective', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [SlowDirective]
});
});
it('should create an instance', () => {
const directive = new SlowDirective(undefined);
expect(directive).toBeTruthy();
});
});