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,7 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { EmployeeDetailComponent } from './employee-detail.component';
|
||||
|
||||
@ -8,6 +11,7 @@ describe('EmployeeDetailComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [EmployeeDetailComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { EmployeeListResolverService } from './employee-list-resolver.service';
|
||||
import { EmployeeListResolver } from './employee-list-resolver.service';
|
||||
|
||||
describe('EmployeeListResolverService', () => {
|
||||
describe('EmployeeListResolver', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [EmployeeListResolverService],
|
||||
imports: [HttpClientModule],
|
||||
providers: [EmployeeListResolver],
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[EmployeeListResolverService],
|
||||
(service: EmployeeListResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([EmployeeListResolver], (service: EmployeeListResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { EmployeeListComponent } from './employee-list.component';
|
||||
|
||||
@ -8,6 +10,7 @@ describe('EmployeeListComponent', () => {
|
||||
|
||||
beforeEach(fakeAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReactiveFormsModule, RouterTestingModule],
|
||||
declarations: [EmployeeListComponent],
|
||||
}).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 { EmployeeResolverService } from './employee-resolver.service';
|
||||
import { EmployeeResolver } from './employee-resolver.service';
|
||||
|
||||
describe('EmployeeResolverService', () => {
|
||||
describe('EmployeeResolver', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [EmployeeDetailResolverService],
|
||||
imports: [HttpClientModule, RouterTestingModule],
|
||||
providers: [EmployeeResolver],
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject(
|
||||
[EmployeeDetailResolverService],
|
||||
(service: EmployeeDetailResolverService) => {
|
||||
expect(service).toBeTruthy();
|
||||
},
|
||||
));
|
||||
it('should be created', inject([EmployeeResolver], (service: EmployeeResolver) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { EmployeeService } from './employee.service';
|
||||
|
||||
describe('EmployeeService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule],
|
||||
providers: [EmployeeService],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user