You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the constructor for the class that I'm testing and here is my test:
describe('tab service', () => {
let tabSvc: TabService;
let app: App;
beforeEach(() => {
app = AppMock.instance();
TestBed.configureTestingModule({
providers: [
TabService,
]
});
tabSvc = new TabService(app);
});
it('should have a updatehistoy method', () => {
expect(tabSvc.updateHistory).toBe(true);
});
});
Every time I run the test it seems like it gets to the constructor of my service then it fails with this error:
TypeError: this.appCtrl.viewDidLeave.subscribe is not a function
Any ideas on what's going on here? I looked at the code and it looks like viewDidLeave is available on your AppMock and should always be an Observable. Any idea why I can't subscribe to it?
The text was updated successfully, but these errors were encountered:
Hey I'm working on getting tests up and running for a service that I wrote that uses the App in the constructor.
Here's the constructor for the class that I'm testing and here is my test:
Every time I run the test it seems like it gets to the constructor of my service then it fails with this error:
TypeError: this.appCtrl.viewDidLeave.subscribe is not a function
Any ideas on what's going on here? I looked at the code and it looks like
viewDidLeave
is available on your AppMock and should always be an Observable. Any idea why I can't subscribe to it?The text was updated successfully, but these errors were encountered: