Commits

Giuseppe Digilio authored 857fd448d4e
fix CI build fail
No tags

src/app/shared/pagination/pagination.component.spec.ts

Modified
7 7 } from '@angular/core/testing';
8 8 import {
9 9 Component,
10 10 CUSTOM_ELEMENTS_SCHEMA,
11 11 DebugElement
12 12 } from "@angular/core";
13 13 import { ActivatedRoute, Router } from "@angular/router";
14 14 import { RouterTestingModule } from '@angular/router/testing';
15 15 import { By } from '@angular/platform-browser';
16 16 import Spy = jasmine.Spy;
17 -import { TranslateModule, TranslateLoader } from "ng2-translate";
17 +import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
18 18 import { Store, StoreModule } from "@ngrx/store";
19 19
20 20 // Load the implementations that should be tested
21 21 import { CommonModule } from '@angular/common';
22 22
23 23 import { Ng2PaginationModule } from 'ng2-pagination';
24 24 import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
25 25
26 26 import { PaginationComponent } from './pagination.component';
27 27 import { PaginationOptions } from '../../core/cache/models/pagination-options.model';
121 121 let _initialState = { width: 1600, height: 770, breakPoint: 'xl' };
122 122
123 123 // async beforeEach
124 124 beforeEach(async(() => {
125 125 activatedRouteStub = new ActivatedRouteStub();
126 126 routerStub = new RouterStub();
127 127 mockStore = new MockStore(_initialState);
128 128
129 129 TestBed.configureTestingModule({
130 130 imports: [CommonModule, StoreModule.provideStore({}), TranslateModule.forRoot({
131 - provide: TranslateLoader,
132 - useClass: MockTranslateLoader
131 + loader: {
132 + provide: TranslateLoader,
133 + useClass: MockTranslateLoader
134 + }
133 135 }), Ng2PaginationModule, NgbModule.forRoot(),
134 136 RouterTestingModule.withRoutes([
135 137 {path: 'home', component: TestComponent}
136 138 ])],
137 139 declarations: [PaginationComponent, TestComponent], // declare the test component
138 140 providers: [
139 141 { provide: ActivatedRoute, useValue: activatedRouteStub },
140 142 { provide: GLOBAL_CONFIG, useValue: EnvConfig },
141 143 { provide: Router, useValue: routerStub },
142 144 { provide: Store, useValue: mockStore },

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut