Replies: 1 comment 1 reply
-
The number of call comes from the number of tests (6), it seems that the mock isn't cleared after each test, the following line fixe this : afterEach(() => {
jest.clearAllMocks();
}); But I don't really understand why the mock isn't automatically cleared after each test. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
calledTimes(1)
heresemver/packages/semver/src/builders/version/builder.spec.ts
Line 156 in 2fdf2c3
MockBuilderContext
seems to read the filesystem for some reason. We should avoid that.jest.mock('fs')
?cc. @edbzn
Maybe this should be an issue 😅
Beta Was this translation helpful? Give feedback.
All reactions