You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
import { StoreModule } from '@ngrx/store';
|
|
|
|
import { RootReducer } from '../../../store/rtl.reducers';
|
|
import { LNDReducer } from '../../../lnd/store/lnd.reducers';
|
|
import { CLNReducer } from '../../../cln/store/cln.reducers';
|
|
import { ECLReducer } from '../../../eclair/store/ecl.reducers';
|
|
import { LoggerService } from '../../../shared/services/logger.service';
|
|
|
|
import { ECLConnectPeerComponent } from './connect-peer.component';
|
|
import { SharedModule } from '../../../shared/shared.module';
|
|
import { mockCLEffects, mockECLEffects, mockLNDEffects, mockMatDialogRef, mockRTLEffects } from '../../../shared/test-helpers/mock-services';
|
|
import { EffectsModule } from '@ngrx/effects';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
|
describe('ECLConnectPeerComponent', () => {
|
|
let component: ECLConnectPeerComponent;
|
|
let fixture: ComponentFixture<ECLConnectPeerComponent>;
|
|
|
|
beforeEach(waitForAsync(() => {
|
|
TestBed.configureTestingModule({
|
|
declarations: [ECLConnectPeerComponent],
|
|
imports: [
|
|
BrowserAnimationsModule,
|
|
SharedModule,
|
|
StoreModule.forRoot({ root: RootReducer, lnd: LNDReducer, cln: CLNReducer, ecl: ECLReducer }),
|
|
EffectsModule.forRoot([mockRTLEffects, mockLNDEffects, mockCLEffects, mockECLEffects])
|
|
],
|
|
providers: [
|
|
LoggerService,
|
|
{ provide: MatDialogRef, useClass: mockMatDialogRef },
|
|
{ provide: MAT_DIALOG_DATA, useValue: { message: {} } }
|
|
]
|
|
}).
|
|
compileComponents();
|
|
}));
|
|
|
|
beforeEach(() => {
|
|
fixture = TestBed.createComponent(ECLConnectPeerComponent);
|
|
component = fixture.componentInstance;
|
|
fixture.detectChanges();
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
|
|
afterEach(() => {
|
|
TestBed.resetTestingModule();
|
|
});
|
|
});
|