File tree Expand file tree Collapse file tree 7 files changed +66
-14
lines changed
Expand file tree Collapse file tree 7 files changed +66
-14
lines changed Original file line number Diff line number Diff line change 11import { TestBed } from '@angular/core/testing' ;
22import { AppComponent } from './app.component' ;
33import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
4+ import { provideRouter } from '@angular/router' ;
5+ import { routes } from './app.routes' ;
46
57describe ( 'AppComponent' , ( ) => {
68 beforeEach ( async ( ) => {
79 await TestBed . configureTestingModule ( {
810 imports : [ AppComponent ] ,
9- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
11+ providers : [
12+ provideExperimentalZonelessChangeDetection ( ) ,
13+ provideRouter ( routes ) ,
14+ ] ,
1015 } ) . compileComponents ( ) ;
1116 } ) ;
1217
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
33import { HeaderComponent } from './header.component' ;
4+ import { provideRouter } from '@angular/router' ;
5+ import { routes } from '../app.routes' ;
46
57describe ( 'HeaderComponent' , ( ) => {
68 let component : HeaderComponent ;
@@ -9,9 +11,12 @@ describe('HeaderComponent', () => {
911 beforeEach ( async ( ) => {
1012 await TestBed . configureTestingModule ( {
1113 imports : [ HeaderComponent ] ,
12- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
14+ providers : [
15+ provideExperimentalZonelessChangeDetection ( ) ,
16+ provideRouter ( routes ) ,
17+ ] ,
1318 } )
14- . compileComponents ( ) ;
19+ . compileComponents ( ) ;
1520
1621 fixture = TestBed . createComponent ( HeaderComponent ) ;
1722 component = fixture . componentInstance ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
33import { UserSpaceComponent } from './user-space.component' ;
4+ import { provideRouter } from '@angular/router' ;
5+ import { routes } from '../../app.routes' ;
46
57describe ( 'UserSpaceComponent' , ( ) => {
68 let component : UserSpaceComponent ;
@@ -9,9 +11,12 @@ describe('UserSpaceComponent', () => {
911 beforeEach ( async ( ) => {
1012 await TestBed . configureTestingModule ( {
1113 imports : [ UserSpaceComponent ] ,
12- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
14+ providers : [
15+ provideExperimentalZonelessChangeDetection ( ) ,
16+ provideRouter ( routes ) ,
17+ ] ,
1318 } )
14- . compileComponents ( ) ;
19+ . compileComponents ( ) ;
1520
1621 fixture = TestBed . createComponent ( UserSpaceComponent ) ;
1722 component = fixture . componentInstance ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
33import { ActivateComponent } from './activate.component' ;
4+ import { provideHttpClientTesting } from '@angular/common/http/testing' ;
5+ import { provideHttpClient } from '@angular/common/http' ;
6+ import { provideRouter } from '@angular/router' ;
7+ import { routes } from '../../app.routes' ;
48
59describe ( 'ActivateComponent' , ( ) => {
610 let component : ActivateComponent ;
@@ -9,9 +13,14 @@ describe('ActivateComponent', () => {
913 beforeEach ( async ( ) => {
1014 await TestBed . configureTestingModule ( {
1115 imports : [ ActivateComponent ] ,
12- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
16+ providers : [
17+ provideExperimentalZonelessChangeDetection ( ) ,
18+ provideHttpClient ( ) ,
19+ provideHttpClientTesting ( ) ,
20+ provideRouter ( routes ) ,
21+ ] ,
1322 } )
14- . compileComponents ( ) ;
23+ . compileComponents ( ) ;
1524
1625 fixture = TestBed . createComponent ( ActivateComponent ) ;
1726 component = fixture . componentInstance ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
33import { LoginComponent } from './login.component' ;
4+ import { provideHttpClientTesting } from '@angular/common/http/testing' ;
5+ import { provideHttpClient } from '@angular/common/http' ;
6+ import { provideRouter } from '@angular/router' ;
7+ import { routes } from '../../app.routes' ;
48
59describe ( 'LoginComponent' , ( ) => {
610 let component : LoginComponent ;
@@ -9,9 +13,14 @@ describe('LoginComponent', () => {
913 beforeEach ( async ( ) => {
1014 await TestBed . configureTestingModule ( {
1115 imports : [ LoginComponent ] ,
12- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
16+ providers : [
17+ provideExperimentalZonelessChangeDetection ( ) ,
18+ provideHttpClient ( ) ,
19+ provideHttpClientTesting ( ) ,
20+ provideRouter ( routes ) ,
21+ ] ,
1322 } )
14- . compileComponents ( ) ;
23+ . compileComponents ( ) ;
1524
1625 fixture = TestBed . createComponent ( LoginComponent ) ;
1726 component = fixture . componentInstance ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
22import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
33import { RegisterComponent } from './register.component' ;
4+ import { provideHttpClientTesting } from '@angular/common/http/testing' ;
5+ import { provideHttpClient } from '@angular/common/http' ;
6+ import { provideRouter } from '@angular/router' ;
7+ import { routes } from '../../app.routes' ;
48
59describe ( 'RegisterComponent' , ( ) => {
610 let component : RegisterComponent ;
@@ -9,9 +13,14 @@ describe('RegisterComponent', () => {
913 beforeEach ( async ( ) => {
1014 await TestBed . configureTestingModule ( {
1115 imports : [ RegisterComponent ] ,
12- providers : [ provideExperimentalZonelessChangeDetection ( ) ] ,
16+ providers : [
17+ provideExperimentalZonelessChangeDetection ( ) ,
18+ provideHttpClient ( ) ,
19+ provideHttpClientTesting ( ) ,
20+ provideRouter ( routes ) ,
21+ ] ,
1322 } )
14- . compileComponents ( ) ;
23+ . compileComponents ( ) ;
1524
1625 fixture = TestBed . createComponent ( RegisterComponent ) ;
1726 component = fixture . componentInstance ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2-
32import { ResetComponent } from './reset.component' ;
3+ import { provideExperimentalZonelessChangeDetection } from '@angular/core' ;
4+ import { provideHttpClientTesting } from '@angular/common/http/testing' ;
5+ import { provideHttpClient } from '@angular/common/http' ;
6+ import { provideRouter } from '@angular/router' ;
7+ import { routes } from '../../app.routes' ;
48
59describe ( 'ResetComponent' , ( ) => {
610 let component : ResetComponent ;
711 let fixture : ComponentFixture < ResetComponent > ;
812
913 beforeEach ( async ( ) => {
1014 await TestBed . configureTestingModule ( {
11- imports : [ ResetComponent ]
15+ imports : [ ResetComponent ] ,
16+ providers : [
17+ provideExperimentalZonelessChangeDetection ( ) ,
18+ provideHttpClient ( ) ,
19+ provideHttpClientTesting ( ) ,
20+ provideRouter ( routes ) ,
21+ ] ,
1222 } )
13- . compileComponents ( ) ;
23+ . compileComponents ( ) ;
1424
1525 fixture = TestBed . createComponent ( ResetComponent ) ;
1626 component = fixture . componentInstance ;
You can’t perform that action at this time.
0 commit comments