---
title: "Better world by better software"
url: https://daily.dev/posts/better-world-by-better-software-bzx7lh13v
source_url: https://glebbahmutov.com/blog/cant-stop-wont-stop
type: article
source: "Gleb Bahmutov"
published: 2026-08-07T17:22:22.471Z
updated: 2026-08-07T17:22:49.521Z
tags: ["testing", "cypress"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Better world by better software

**[Gleb Bahmutov](https://daily.dev/sources/glebbahmutov)** · 3 min read · 0 upvotes · 0 comments

## Summary

Three approaches to stopping or skipping Cypress test commands mid-test are compared. Option 1 uses Cypress.stop, which destroys the Command Log and skips all remaining tests in the spec — too destructive. Option 2 uses Mocha's this.skip(), which collapses the current test but lets the rest of the spec run; it requires function syntax or cy.state to access the Mocha context. Option 3, the recommended approach, adds a custom cy.skip() command that marks remaining queued commands as skipped without stopping the test, preserving the full Command Log for inspection.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://glebbahmutov.com/blog/cant-stop-wont-stop>

## Questions this post answers

### How do I skip the rest of a Cypress test without stopping the whole spec file?

Use Mocha's this.skip() inside a function-syntax test (not an arrow function), or grab the context via cy.state('runnable') in an arrow function. This collapses the current test and marks it as skipped, but lets all remaining tests in the spec file continue running and appear in the Command Log.

_Developers debugging flaky Cypress suites track patterns like this on daily.dev._

### What does Cypress.stop() do and why should I avoid it?

Cypress.stop() immediately destroys the Command Log and skips every remaining test in the current spec file. You lose visibility into all commands, including ones that already passed before the stop call. It is effectively an emergency brake that makes post-failure inspection impossible, making it unsuitable for targeted mid-test skipping.

_Teams maintaining large Cypress suites find targeted debugging techniques like this on daily.dev._

### How do I write a custom cy.skip() command in Cypress that skips remaining commands but keeps the test visible?

Add a custom command that iterates over the remaining entries in Cypress's command queue and calls .skip() on each one. Inserting cy.skip() anywhere in a test marks all subsequent queued commands as skipped without collapsing the test or stopping the spec, so completed commands remain visible in the Command Log for inspection.

_Engineers building reusable Cypress utilities share patterns like this on daily.dev._

## Similar posts on daily.dev

- [Better world by better software](https://daily.dev/posts/better-world-by-better-software-afxfv6uwc) · Gleb Bahmutov · 0 upvotes · 0 comments
- [Clearer command logs: Hide HTTP requests in the Cypress App](https://daily.dev/posts/clearer-command-logs-hide-http-requests-in-the-cypress-app-ssqoemey5) · cypress · 4 upvotes · 0 comments
- [Cypress Studio: No-Code Test Generation Now Built In](https://daily.dev/posts/cypress-studio-no-code-test-generation-now-built-in-r3dgctx3y) · cypress · 50 upvotes · 2 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#cypress](https://daily.dev/tags/cypress)

[View this post on daily.dev](https://daily.dev/posts/better-world-by-better-software-bzx7lh13v)
