Skip to content

Commit

Permalink
Fixed testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pimmerks committed Jun 2, 2020
1 parent b9a2639 commit 0b244c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/helpers/guards/auth/auth.guard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import { TestBed } from '@angular/core/testing';

import { AuthGuard } from './auth.guard';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';

describe('AuthGuard', () => {
let guard: AuthGuard;

beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
imports: [
HttpClientModule,
RouterTestingModule,
]
});
guard = TestBed.inject(AuthGuard);
});

Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/auth/components/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RouterTestingModule } from '@angular/router/testing';
import { HttpClientModule } from '@angular/common/http';
import { ClarityModule } from '@clr/angular';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { SharedModule } from '@shared/shared.module';

describe('LoginComponent', () => {
let component: LoginComponent;
Expand All @@ -17,6 +18,7 @@ describe('LoginComponent', () => {
RouterTestingModule,
HttpClientModule,
ClarityModule,
SharedModule,
],
declarations: [
LoginComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { HttpClientModule } from '@angular/common/http';
import { ClarityModule } from '@clr/angular';
import { SharedModule } from '@shared/shared.module';

describe('RegisterComponent', () => {
let component: RegisterComponent;
Expand All @@ -17,6 +18,7 @@ describe('RegisterComponent', () => {
RouterTestingModule,
HttpClientModule,
ClarityModule,
SharedModule,
],
declarations: [ RegisterComponent ]
})
Expand Down

0 comments on commit 0b244c8

Please sign in to comment.