40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
|
|
import { ChainEditPage } from './chain-edit-page';
|
|
import { ActivatedRoute } from '@angular/router';
|
|
|
|
import { of } from 'rxjs';
|
|
import { Chain } from '../../../../models/Chain';
|
|
import { ChainSettings } from '../../../../services/chain-settings';
|
|
import { provideTranslateService } from '@ngx-translate/core';
|
|
|
|
describe('ChainEditPage', () => {
|
|
let component: ChainEditPage;
|
|
let fixture: ComponentFixture<ChainEditPage>;
|
|
|
|
let activatedRoute: Partial<ActivatedRoute>;
|
|
|
|
beforeEach(async () => {
|
|
activatedRoute = {
|
|
data: of({chain: new Chain('Mock', '', 1)}),
|
|
};
|
|
|
|
await TestBed.configureTestingModule({
|
|
imports: [ChainEditPage],
|
|
providers: [
|
|
{ provide: ActivatedRoute, useValue: activatedRoute },
|
|
{ provide: ChainSettings, useValue: {} },
|
|
provideTranslateService()
|
|
],
|
|
}).compileComponents();
|
|
|
|
fixture = TestBed.createComponent(ChainEditPage);
|
|
component = fixture.componentInstance;
|
|
await fixture.whenStable();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
});
|