-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
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
v0.5.4 makes correct tests fail #778
Comments
Hi all. I believe I am facing a similar issue that may be related to the same root cause. I created a dummy example to highlight the issue. Dummy Service which requires unit tests: export class DummyService {
foo(): boolean {
return true;
}
} Test implementations: it('arbitrary test case description', async () => {
const serviceMock = createMock<DummyService>();
jest
.spyOn(serviceMock, 'foo')
.mockReturnValueOnce(true)
.mockReturnValueOnce(false)
.mockReturnValueOnce(true);
console.log(serviceMock.foo());
console.log(serviceMock.foo());
console.log(serviceMock.foo());
} expected result:
actual result:
|
Since I kicked off the initial change, I fixed this issue as well with #787 |
Mock repository:
Example test 1:
Example test 1 console output:
Example test 2:
Example test 2 console output:
However, these tests are all correct. When I downgrade the package to v0.5.0 all the tests pass. That's what I've done for now. Can somebody help?
The text was updated successfully, but these errors were encountered: