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:
2020-10-02 16:24:29 +05:30
parent d77053d92a
commit cefb3ebdcc
118 changed files with 410 additions and 418 deletions

View File

@ -1,4 +1,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { RoleDetailComponent } from './role-detail.component';
@ -8,6 +10,7 @@ describe('RoleDetailComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ReactiveFormsModule, RouterTestingModule],
declarations: [RoleDetailComponent],
}).compileComponents();
}));

View File

@ -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 './role-list-resolver.service';
import { RoleListResolver } from './role-list-resolver.service';
describe('ClientListResolverService', () => {
describe('RoleListResolver', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [ClientListResolverService],
imports: [HttpClientModule, RouterTestingModule],
providers: [RoleListResolver],
});
});
it('should be created', inject(
[ClientListResolverService],
(service: ClientListResolverService) => {
expect(service).toBeTruthy();
},
));
it('should be created', inject([RoleListResolver], (service: RoleListResolver) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,4 +1,5 @@
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { RoleListComponent } from './role-list.component';
@ -8,6 +9,7 @@ describe('RoleListComponent', () => {
beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [RoleListComponent],
}).compileComponents();

View File

@ -1,18 +1,18 @@
import { inject, TestBed } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http';
import { RouterTestingModule } from '@angular/router/testing';
import { RoleResolverService } from './role-resolver.service';
import { RoleResolver } from './role-resolver.service';
describe('RoleResolverService', () => {
describe('RoleResolver', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [RoleDetailResolverService],
imports: [HttpClientModule, RouterTestingModule],
providers: [RoleResolver],
});
});
it('should be created', inject(
[RoleDetailResolverService],
(service: RoleDetailResolverService) => {
expect(service).toBeTruthy();
},
));
it('should be created', inject([RoleResolver], (service: RoleResolver) => {
expect(service).toBeTruthy();
}));
});

View File

@ -1,10 +1,12 @@
import { inject, TestBed } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http';
import { RoleService } from './role.service';
describe('RoleService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule],
providers: [RoleService],
});
});