We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
spy.mockRevert
spy.mockRestore
1 parent 4705cf3 commit d8566d8Copy full SHA for d8566d8
packages/mocker/src/automocker.ts
@@ -120,7 +120,7 @@ export function mockObject(
120
const original = this[key]
121
const mock = spyOn(this, key as string)
122
.mockImplementation(original)
123
- mock.mockRestore = () => {
+ mock.mockRevert = mock.mockRestore = () => {
124
mock.mockReset()
125
mock.mockImplementation(original)
126
return mock
@@ -132,7 +132,7 @@ export function mockObject(
132
const mock = spyOn(newContainer, property)
133
if (options.type === 'automock') {
134
mock.mockImplementation(mockFunction)
135
136
137
138
0 commit comments