Skip to content

Commit

Permalink
Test import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Apr 4, 2024
1 parent ba36aa8 commit ba4d0df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SharedModule } from '../../../../shared.module';

import { DataService } from '../../../../services/data.service';
import { CommonService } from '../../../../services/common.service';
import { mockDataService } from '../../../../test-helpers/mock-services';
import { SwapStatusComponent } from './swap-status.component';

describe('SwapStatusComponent', () => {
Expand All @@ -10,7 +13,11 @@ describe('SwapStatusComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SwapStatusComponent],
imports: [SharedModule]
imports: [SharedModule],
providers: [
CommonService,
{ provide: DataService, useClass: mockDataService }
]
}).
compileComponents();
}));
Expand Down
2 changes: 2 additions & 0 deletions src/app/shared/test-helpers/mock-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export class mockLoopService {
export class mockBoltzService {

public swapsChanged = new BehaviorSubject<any[]>([]);
public boltzInfoChanged = new BehaviorSubject<any>({});
getBoltzInfo() { };
getSwapsList() { };
listSwaps() { };
swapInfo(id: string) { };
Expand Down

0 comments on commit ba4d0df

Please sign in to comment.