Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
fixed rebort unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
TumiPare committed Sep 27, 2023
1 parent c8684f6 commit fe7ff20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/WhereIsThePower/src/app/report/report.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ describe('ReportPage', () => {

it('should run #ionViewWillEnter()', async () => {
component.authService = component.authService || {};
component.authService.isUserLoggedIn = jest.fn();
spyOn(component.authService, 'isUserLoggedIn');
await component.ionViewWillEnter();
// expect(component.authService.isUserLoggedIn).toHaveBeenCalled();
});

it('should run #report()', async () => {
component.reportService = component.reportService || {};
component.reportService.reportIssue = jest.fn().mockReturnValue(observableOf({}));
spyOn(component.reportService, 'reportIssue').and.returnValue(observableOf({}));
component.router = component.router || {};
component.router.navigate = jest.fn();
spyOn(component.router, 'navigate');
component.report({});
// expect(component.reportService.reportIssue).toHaveBeenCalled();
// expect(component.router.navigate).toHaveBeenCalled();
});

it('should run #ngOnDestroy()', async () => {
component.createReportSubscription = component.createReportSubscription || {};
component.createReportSubscription.unsubscribe = jest.fn();
spyOn(component.createReportSubscription, 'unsubscribe');
component.ngOnDestroy();
// expect(component.createReportSubscription.unsubscribe).toHaveBeenCalled();
});
Expand Down
3 changes: 2 additions & 1 deletion app/WhereIsThePower/src/app/tab-saved/tab-saved.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,5 @@ describe('TabSavedPage', () => {
// expect(component.placesSubscription.unsubscribe).toHaveBeenCalled();
});

});Error: ERROR this JS code is invalid, "data.features.map((feature)"
});
// Error: ERROR this JS code is invalid, "data.features.map((feature)"

0 comments on commit fe7ff20

Please sign in to comment.