refactor(aio): remove unused `Logger` dependencies
This commit is contained in:
parent
ba0f6decc3
commit
0564dd25e2
|
@ -4,7 +4,6 @@ import { MockBackend } from '@angular/http/testing';
|
||||||
|
|
||||||
import { ContributorService } from './contributor.service';
|
import { ContributorService } from './contributor.service';
|
||||||
import { Contributor, ContributorGroup } from './contributors.model';
|
import { Contributor, ContributorGroup } from './contributors.model';
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
|
|
||||||
describe('ContributorService', () => {
|
describe('ContributorService', () => {
|
||||||
|
|
||||||
|
@ -21,8 +20,7 @@ describe('ContributorService', () => {
|
||||||
ContributorService,
|
ContributorService,
|
||||||
{ provide: ConnectionBackend, useClass: MockBackend },
|
{ provide: ConnectionBackend, useClass: MockBackend },
|
||||||
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
||||||
Http,
|
Http
|
||||||
Logger
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
backend = injector.get(ConnectionBackend);
|
backend = injector.get(ConnectionBackend);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { Observable } from 'rxjs/Observable';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
|
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
import { Contributor, ContributorGroup } from './contributors.model';
|
import { Contributor, ContributorGroup } from './contributors.model';
|
||||||
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ const knownGroups = ['Angular', 'Community'];
|
||||||
export class ContributorService {
|
export class ContributorService {
|
||||||
contributors: Observable<ContributorGroup[]>;
|
contributors: Observable<ContributorGroup[]>;
|
||||||
|
|
||||||
constructor(private http: Http, private logger: Logger) {
|
constructor(private http: Http) {
|
||||||
this.contributors = this.getContributors();
|
this.contributors = this.getContributors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { MockBackend } from '@angular/http/testing';
|
||||||
|
|
||||||
import { ResourceService } from './resource.service';
|
import { ResourceService } from './resource.service';
|
||||||
import { Category, SubCategory, Resource } from './resource.model';
|
import { Category, SubCategory, Resource } from './resource.model';
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
|
|
||||||
describe('ResourceService', () => {
|
describe('ResourceService', () => {
|
||||||
|
|
||||||
|
@ -21,8 +20,7 @@ describe('ResourceService', () => {
|
||||||
ResourceService,
|
ResourceService,
|
||||||
{ provide: ConnectionBackend, useClass: MockBackend },
|
{ provide: ConnectionBackend, useClass: MockBackend },
|
||||||
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
||||||
Http,
|
Http
|
||||||
Logger
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
backend = injector.get(ConnectionBackend);
|
backend = injector.get(ConnectionBackend);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { Observable } from 'rxjs/Observable';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
|
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
import { Category, Resource, SubCategory } from './resource.model';
|
import { Category, Resource, SubCategory } from './resource.model';
|
||||||
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ const resourcesPath = CONTENT_URL_PREFIX + 'resources.json';
|
||||||
export class ResourceService {
|
export class ResourceService {
|
||||||
categories: Observable<Category[]>;
|
categories: Observable<Category[]>;
|
||||||
|
|
||||||
constructor(private http: Http, private logger: Logger) {
|
constructor(private http: Http) {
|
||||||
this.categories = this.getCategories();
|
this.categories = this.getCategories();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { MockBackend } from '@angular/http/testing';
|
||||||
import { CurrentNodes, NavigationService, NavigationViews, NavigationNode, VersionInfo } from 'app/navigation/navigation.service';
|
import { CurrentNodes, NavigationService, NavigationViews, NavigationNode, VersionInfo } from 'app/navigation/navigation.service';
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { MockLocationService } from 'testing/location.service';
|
import { MockLocationService } from 'testing/location.service';
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
|
|
||||||
describe('NavigationService', () => {
|
describe('NavigationService', () => {
|
||||||
|
|
||||||
|
@ -22,8 +21,7 @@ describe('NavigationService', () => {
|
||||||
{ provide: LocationService, useFactory: () => new MockLocationService('a') },
|
{ provide: LocationService, useFactory: () => new MockLocationService('a') },
|
||||||
{ provide: ConnectionBackend, useClass: MockBackend },
|
{ provide: ConnectionBackend, useClass: MockBackend },
|
||||||
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
{ provide: RequestOptions, useClass: BaseRequestOptions },
|
||||||
Http,
|
Http
|
||||||
Logger
|
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import 'rxjs/add/operator/map';
|
||||||
import 'rxjs/add/operator/publishLast';
|
import 'rxjs/add/operator/publishLast';
|
||||||
import 'rxjs/add/operator/publishReplay';
|
import 'rxjs/add/operator/publishReplay';
|
||||||
|
|
||||||
import { Logger } from 'app/shared/logger.service';
|
|
||||||
import { LocationService } from 'app/shared/location.service';
|
import { LocationService } from 'app/shared/location.service';
|
||||||
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ export class NavigationService {
|
||||||
*/
|
*/
|
||||||
currentNodes: Observable<CurrentNodes>;
|
currentNodes: Observable<CurrentNodes>;
|
||||||
|
|
||||||
constructor(private http: Http, private location: LocationService, private logger: Logger) {
|
constructor(private http: Http, private location: LocationService) {
|
||||||
const navigationInfo = this.fetchNavigationInfo();
|
const navigationInfo = this.fetchNavigationInfo();
|
||||||
this.navigationViews = this.getNavigationViews(navigationInfo);
|
this.navigationViews = this.getNavigationViews(navigationInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue