Removed old rules from eslint
Tried hand at testing by fixing the spec files with import. However, still many errors and given up now.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { UserDetailComponent } from './user-detail.component';
|
||||
|
||||
@@ -8,6 +10,7 @@ describe('UserDetailComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [UserDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { ClientListResolverService } from './user-list-resolver.service';
|
||||
import { UserListResolver } from './user-list-resolver.service';
|
||||
|
||||
describe('ClientListResolverService', () => {
|
||||
describe('UserListResolver', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [ClientListResolverService],
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
providers: [UserListResolver],
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[ClientListResolverService],
|
||||
(service: ClientListResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([UserListResolver], (service: UserListResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { UserResolverService } from './user-resolver.service';
|
||||
import { UserResolver } from './user-resolver.service';
|
||||
|
||||
describe('UserResolverService', () => {
|
||||
describe('UserResolver', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [UserDetailResolverService],
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
providers: [UserResolver],
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[UserDetailResolverService],
|
||||
(service: UserDetailResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([UserResolver], (service: UserResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { UserService } from './user.service';
|
||||
|
||||
describe('UserService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule],
|
||||
providers: [UserService],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user