Skip to content

Commit

Permalink
FIx tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RonanCodes committed Apr 29, 2024
1 parent 4f16bdb commit 1d599f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { MockComponent } from 'ng-mocks';
import { HomeComponent } from './home/home.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
imports: [AppComponent, MockComponent(HomeComponent)],
}).compileComponents();
});

Expand Down
2 changes: 2 additions & 0 deletions src/app/home/home.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
import { CommonModule } from '@angular/common';
import { of } from 'rxjs';
import { JokeStoreService } from '../joke-store/joke-store.service';
import { RouterModule } from '@angular/router';

describe('HomeComponent', () => {
let component: HomeComponent;
Expand All @@ -29,6 +30,7 @@ describe('HomeComponent', () => {
MatButtonModule,
MatToolbarModule,
CommonModule,
RouterModule.forRoot([]),
],
providers: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
import { JokeStoreService } from '../joke-store/joke-store.service';
import { HourGlass } from '../chuck-norris-joke-generator/chuck-norris-joke-generator.model';
import { CommonModule } from '@angular/common';
import { Router, RouterModule } from '@angular/router';
import { RouterModule } from '@angular/router';

@Component({
selector: 'cnjg-home',
Expand Down

0 comments on commit 1d599f0

Please sign in to comment.