Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from '@angular/core';
- import { Routes, RouterModule } from '@angular/router';
- export const routes: Routes = [
- {path: 'dashboard', loadChildren: './dashboard/dashboard.module#DashboardModule'},
- {path: '', loadChildren: './splash/splash.module#SplashModule'},
- ];
- @NgModule({
- imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule]
- })
- export class AppRoutingModule { }
- import { TestBed, fakeAsync, tick, async } from "@angular/core/testing";
- import { RouterTestingModule } from '@angular/router/testing';
- import { AppComponent } from './app.component';
- import { routes } from './app-routing.module';
- describe('AppComponent', () => {
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- imports: [
- RouterTestingModule.withRoutes(routes)
- ],
- declarations: [
- AppComponent
- ],
- }).compileComponents();
- }));
- it('should create the app', async(() => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.debugElement.componentInstance;
- expect(app).toBeTruthy();
- }));
- it('should have as title "feedback-analytics"', async(() => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.debugElement.componentInstance;
- expect(app.title).toEqual("feedback-analytics");
- }));
- // it("navigate to '' redirects you to /dashboard ", fakeAsync(() => {
- // this.routes.navigate(['']);
- // tick();
- // expect(location.path()).toBe('/dashboard');
- // }));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement