Skip to content

Commit 9bcd969

Browse files
IsmaestroIsmael Ramos
authored andcommitted
fix(tests): declarated Error404 component inside unit tests
1 parent 5990384 commit 9bcd969

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/app/app.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
99
import {APP_CONFIG, AppConfig} from './config/app.config';
1010
import {HeroService} from './heroes/shared/hero.service';
1111
import {UtilsService} from './shared/services/utils.service';
12+
import {Error404Component} from './core/error404/error-404.component';
1213

1314
describe('AppComponent', () => {
1415
let fixture;
@@ -23,7 +24,8 @@ describe('AppComponent', () => {
2324
],
2425
declarations: [
2526
AppComponent,
26-
HeroTopComponent
27+
HeroTopComponent,
28+
Error404Component
2729
],
2830
providers: [
2931
{provide: APP_CONFIG, useValue: AppConfig},

src/app/core/core.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import {Error404Component} from './error404/error-404.component';
2323
],
2424
exports: [
2525
NavComponent,
26-
FooterComponent,
27-
Error404Component
26+
FooterComponent
2827
],
2928
declarations: [
3029
NavComponent,

src/app/core/search-bar/search-bar.component.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {AppRoutingModule} from '../../app-routing.module';
88
import {HeroTopComponent} from '../../heroes/hero-top/hero-top.component';
99
import {APP_BASE_HREF} from '@angular/common';
1010
import {TestsModule} from '../../shared/modules/tests.module';
11+
import {Error404Component} from '../error404/error-404.component';
1112

1213
describe('SearchBarComponent', () => {
1314
let fixture;
@@ -23,7 +24,8 @@ describe('SearchBarComponent', () => {
2324
],
2425
declarations: [
2526
SearchBarComponent,
26-
HeroTopComponent
27+
HeroTopComponent,
28+
Error404Component
2729
],
2830
providers: [
2931
{provide: APP_CONFIG, useValue: AppConfig},

src/app/shared/modules/tests.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {HttpClientModule} from '@angular/common/http';
77
import {RouterModule} from '@angular/router';
88
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
99
import {RouterTestingModule} from '@angular/router/testing';
10+
import {CoreModule} from '../../core/core.module';
1011

1112
@NgModule({
12-
declarations: [],
1313
exports: [
1414
BrowserModule,
1515
BrowserAnimationsModule,

0 commit comments

Comments
 (0)