We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this interface mock on my before each test
SplashScreenMock = mock<SplashScreenPlugin>(); when(SplashScreenMock.hide()).thenResolve();
when I try to check if it was called using verify(SplashScreenMock.hide()).once() I always says it never was called.
verify(SplashScreenMock.hide()).once()
My workaround is to manually create a partial mock instead
SplashScreenMock = { hide: jest.fn() } as any;
and test it with expect(SplashScreenMock.hide).toHaveBeenCalledTimes(1); (which works just fine)
expect(SplashScreenMock.hide).toHaveBeenCalledTimes(1);
The code is implemented in this way
this.globalEvents.homePageFinishLoading$.pipe(first()).subscribe(async () => { await this.splashScreen.hide(); this.logger.log('hideSplashScreen Done'); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have this interface mock on my before each test
when I try to check if it was called using
verify(SplashScreenMock.hide()).once()
I always says it never was called.My workaround is to manually create a partial mock instead
and test it with
expect(SplashScreenMock.hide).toHaveBeenCalledTimes(1);
(which works just fine)The code is implemented in this way
The text was updated successfully, but these errors were encountered: