allow disable of DOM snapshots for stubs and spies
See original GitHub issueI use a lot of spies and stubs, and don’t need a DOM snapshot every time a spied function is called, since a DOM snapshot is memory/CPU intensive
We should be able to disable the snapshot similar to how we can disable the log:
cy.stub().log(false)
cy.stub().snapshot(false)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Interacting with Elements - Cypress Documentation
Cypress will watch the DOM - re-running the queries that yielded the current subject ... Cypress checks whether an element's disabled property is...
Read more >Best Practices for Spies, Stubs and Mocks in Sinon.js
In this article, we'll show you the differences between spies, stubs and mocks, when and how to use them, and give you a...
Read more >Testing React components - Untitled Kingdom
Often we don't even want to touch the DOM and generate HTML as it doesn't make ... of all the spies and stubs...
Read more >ES6 Class Mocks - Jest
Again, this allows you to inject different behavior for testing, but does not provide a way to spy on calls. * Module factory...
Read more >Cypress - Code Like This
If you want to temporarily enable or disable tests, you can use only or skip ... Cypress saves DOM snapshots for every command,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jennifer-shehane
.log
chained off of a cypress stub/spy sets whether the stub will log or not. We do this because you cannot pass an options object tocy.stub()
(theres no good way to know whats the options object and whats the stub subject)maybe simply support a
.options([..options])
method on a stub/spy instance to set the options.here’s where we create the
.log
function on a stub/spy https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cy/commands/agents.coffee#L187Released in
5.0.0
.This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v5.0.0, please open a new issue.