// Close a batch
cy.endBatch(): thisClose a batch. Only the outermost close applies deferred styles and fires a batchend event. After that event, style reads reflect the completed batch. Nested closes and calls without an open batch do nothing.
batchend follows all element events and any patch summary produced by the batch. It carries no diff: listen to the events between batchstart and batchend to collect the changes.
Returns
thisthis core, for chaining
Example
cy.startBatch();cy.getElementById('a').data('score', 5);cy.endBatch();console.log(cy.getElementById('a').data('score')); // 5