diff --git a/docs/api/commands/stub.mdx b/docs/api/commands/stub.mdx index 3fb05a1b37..2082853a0d 100644 --- a/docs/api/commands/stub.mdx +++ b/docs/api/commands/stub.mdx @@ -19,7 +19,6 @@ assertion. It is not retryable, chainable, or timeout-able. ```javascript cy.stub() cy.stub(object, method) -cy.stub(object, method, replacerFn) ``` ### Usage @@ -41,10 +40,6 @@ The `object` that has the `method` to be replaced. The name of the `method` on the `object` to be wrapped. - **replacerFn _(Function)_** - -The function used to replace the `method` on the `object`. - ### Yields [](/guides/core-concepts/introduction-to-cypress#Subject-Management) {#Yields} - `cy.stub()` is _synchronous_ and returns a value (the stub) instead of a @@ -82,7 +77,7 @@ expect(util.addListeners).to.be.called // assume App.start calls util.addListeners let listenersAdded = false -cy.stub(util, 'addListeners', () => { +cy.stub(util, 'addListeners').callsFake(() => { listenersAdded = true })