# Mocha

Mocha is a JavaScript test framework for Node.js and web browsers.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How to Stop or Skip Cypress Test Commands

DevFeed: [How to Stop or Skip Cypress Test Commands](<https://devfeed.tech/articles/can-t-stop-won-t-stop-28877.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/cant-stop-wont-stop/>)

Author: Gleb Bahmutov

Published: 2026-08-07T04:00:00Z

Content type: tutorial

Language: en

Sources: [Gleb Bahmutov](<https://devfeed.tech/sources/gleb-bahmutov.md>)

Topics: [Cypress](<https://devfeed.tech/topics/cypress.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [test](<https://devfeed.tech/topics/test.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [callback](<https://devfeed.tech/tags/callback.md>), [command](<https://devfeed.tech/tags/command.md>), [commands](<https://devfeed.tech/tags/commands.md>), [condition](<https://devfeed.tech/tags/condition.md>), [cypress](<https://devfeed.tech/tags/cypress.md>), [object](<https://devfeed.tech/tags/object.md>), [products](<https://devfeed.tech/tags/products.md>), [skip](<https://devfeed.tech/tags/skip.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This tutorial explains three ways to stop or skip Cypress test execution: using Cypress.stop, skipping the current Mocha test, and skipping the remaining commands in the Cypress command queue. It describes the trade-offs of each approach, including whether later tests run and whether completed commands remain visible.

### Source excerpt

Let's say you have a long-ish Cypress test and you know a place where it might fail. You want to stop / skip the test commands.

## How To Type Function Mocha Context With Cypress Aliases

DevFeed: [How To Type Function Mocha Context With Cypress Aliases](<https://devfeed.tech/articles/how-to-type-function-mocha-context-with-cypress-aliases-28901.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/type-test-context/>)

Author: Gleb Bahmutov

Published: 2025-12-11T05:00:00Z

Content type: tutorial

Language: en

Sources: [Gleb Bahmutov](<https://devfeed.tech/sources/gleb-bahmutov.md>)

Topics: [Cypress](<https://devfeed.tech/topics/cypress.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [argument](<https://devfeed.tech/tags/argument.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [cypress](<https://devfeed.tech/tags/cypress.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [linter](<https://devfeed.tech/tags/linter.md>), [products](<https://devfeed.tech/tags/products.md>), [test](<https://devfeed.tech/tags/test.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

This tutorial explains how to add strong typing for the custom property Cypress aliases place on the Mocha test context. It shows how to extend the relevant callback context type when the bundled type is not directly exposed.

### Source excerpt

In Cypress you can save values under aliases which is pretty handy. You can get the aliased value

## Node.js 24.0.0 (Current)

DevFeed: [Node.js 24.0.0 (Current)](<https://devfeed.tech/articles/node-js-24-0-0-current-2805.md>)

Original publisher: [Read original article](<https://nodejs.org/en/blog/release/v24.0.0>)

Published: 2025-05-06T14:31:35Z

Content type: release

Language: en

Sources: [Node.js Blog](<https://devfeed.tech/sources/node-js-blog.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [npm](<https://devfeed.tech/topics/npm.md>), [V8](<https://devfeed.tech/topics/v8.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [http](<https://devfeed.tech/tags/http.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [latest-release](<https://devfeed.tech/tags/latest-release.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npm](<https://devfeed.tech/tags/npm.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>), [release](<https://devfeed.tech/tags/release.md>), [security](<https://devfeed.tech/tags/security.md>), [tests](<https://devfeed.tech/tags/tests.md>), [updates](<https://devfeed.tech/tags/updates.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

Node.js 24.0.0 is a Current release that upgrades V8 to 13.6 and npm to 11, removes MSVC support on Windows in favor of ClangCL, improves asynchronous context tracking, expands the Permission Model, enhances the test runner, and updates Undici. It is scheduled to enter long-term support in October.

### Source excerpt

Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.

## Node.js March 17th Infrastructure Incident Post-mortem

DevFeed: [Node.js March 17th Infrastructure Incident Post-mortem](<https://devfeed.tech/articles/node-js-march-17th-infrastructure-incident-post-mortem-2424.md>)

Original publisher: [Read original article](<https://nodejs.org/en/blog/announcements/node-js-march-17-incident>)

Published: 2023-03-23T20:10:01Z

Content type: article

Language: en

Sources: [Node.js Blog](<https://devfeed.tech/sources/node-js-blog.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [Post Mortem](<https://devfeed.tech/topics/post-mortem.md>), [incident](<https://devfeed.tech/topics/incident.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [incident](<https://devfeed.tech/tags/incident.md>), [migration](<https://devfeed.tech/tags/migration.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [post-mortem](<https://devfeed.tech/tags/post-mortem.md>)

### AI overview

This post-mortem explains an infrastructure incident that caused intermittent 404 responses when users downloaded Node.js or accessed parts of nodejs.org. Cloudflare cached incorrect 404 responses, an overloaded origin server returned 404s for valid files, and a build script bug triggered frequent rebuilds and cache purges after the migration to Next.js. The team fixed the configuration and reduced origin load, with the incident fully resolved on March 17.

### Source excerpt

Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.

## Add Mocha reporter for Karma unit tests to your Angular CLI project

DevFeed: [Add Mocha reporter for Karma unit tests to your Angular CLI project](<https://devfeed.tech/articles/add-mocha-reporter-for-karma-unit-tests-to-your-angular-cli-project-21325.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2018/02/add-mocha-reporter-angular-cli-tests/>)

Published: 2018-02-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Angular CLI](<https://devfeed.tech/topics/angular-cli.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [test](<https://devfeed.tech/topics/test.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Yarn](<https://devfeed.tech/topics/yarn.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [cli](<https://devfeed.tech/tags/cli.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [install](<https://devfeed.tech/tags/install.md>), [npm](<https://devfeed.tech/tags/npm.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This tutorial explains how to replace Karma's default progress reporter with the Karma Mocha reporter in an Angular CLI project. It covers installing the reporter with npm or Yarn, updating the project configuration, and viewing test suite and test case names in the resulting output.

### Source excerpt

Lorem ipsum dolor sit amet

## Automatic visual diffing with Puppeteer

DevFeed: [Automatic visual diffing with Puppeteer](<https://devfeed.tech/articles/automatic-visual-diffing-with-puppeteer-35504.md>)

Original publisher: [Read original article](<https://meowni.ca/posts/2017-puppeteer-tests/>)

Author: Monica Dinculescu

Published: 2018-01-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Monica Dinculescu](<https://devfeed.tech/sources/monica-dinculescu.md>)

Topics: [Puppeteer](<https://devfeed.tech/topics/puppeteer.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>), [Chai](<https://devfeed.tech/topics/chai.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [npm](<https://devfeed.tech/topics/npm.md>), [Selenium](<https://devfeed.tech/topics/selenium.md>), [Express](<https://devfeed.tech/topics/express.md>)

Tags: [chrome](<https://devfeed.tech/tags/chrome.md>), [code](<https://devfeed.tech/tags/code.md>), [npm](<https://devfeed.tech/tags/npm.md>), [selenium](<https://devfeed.tech/tags/selenium.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A tutorial on using Puppeteer to take screenshots of web application routes and compare them with golden images for visual regression testing. The approach works with Chrome, supports wide and narrow viewports, and can exercise UI states such as an opened navigation drawer.

### Source excerpt

So testing, right? We should do it. The thing is, testing is hard, and good testing is reaaaaaaally hard, and tbh I'm pretty bad at testing. So I end up not testing my apps, and then I feel guilty about it, but I'll stop you now: you can't run guilt on Travis. If this sounds familiar, then this blog post is for you. I did a little song-and-dance that sets up Puppeteer* , takes screenshots of your app (like, all the routes you care about), and then compares them to the "golden" ones. If they match, your test passes! Yes, it only works on Chrome. No, it's not actually unit testing. Yes, it's literally just counting pixels but you know what? It counts them in both a wide and a narrow viewport size and any testing is better than no testing at all; fight me. * Puppeteer is an npm library that lets you control Chrome. You know, like a puppet. In particular, Puppeteer makes it super easy to take screenshots (and click on things in your page). It's like a waaaaaaay less infuriating Selenium, but infinitely harder to spell. This post looks long because I've put all the code I have so that you can copy paste it. Skip to the good part if you already know how to test. Do the npm If you want to test things with Puppeteer, you have to setup a thing for the tests, a server that launches your site, and then Puppeteer to look at that site. I have this in my package.json to wrangle these things: "devDependencies": { "chai": "^4.1.2", "mocha": "^5.0.0", "puppeteer": "^1.0.0", "pixelmatch": "^4.0.2", "polyserve": "^0.23.0" } Explanation: I chose Mocha/Chai for testing because that's what I'm used to. You can literally use any other testing framework you're comfortable with; I don't think it matters. Pixelmatch is the thing that diffs two images and tells you how many pixels they differ by. It's super awesome 🏆. Polyserve is what I use as a local server. You can use Python or Express or whatever you cool kids use. I'll point out in the code where it's Polyserve specific (literally 2 lin

## CICD for Serverless Part 1 - Mocha Endpoint Testing

DevFeed: [CICD for Serverless Part 1 - Mocha Endpoint Testing](<https://devfeed.tech/articles/cicd-for-serverless-part-1-mocha-endpoint-testing-14130.md>)

Original publisher: [Read original article](<https://www.serverless.com/blog/cicd-for-serverless-part-1>)

Author: Pete Johnson

Published: 2017-02-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Serverless Blog](<https://devfeed.tech/sources/serverless-blog.md>)

Topics: [Serverless](<https://devfeed.tech/topics/serverless.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [aws-lambda](<https://devfeed.tech/tags/aws-lambda.md>), [cicd](<https://devfeed.tech/tags/cicd.md>), [cloud-computing](<https://devfeed.tech/tags/cloud-computing.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [faas](<https://devfeed.tech/tags/faas.md>), [function-as-a-service](<https://devfeed.tech/tags/function-as-a-service.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [serverless-architecture](<https://devfeed.tech/tags/serverless-architecture.md>), [serverless-framework](<https://devfeed.tech/tags/serverless-framework.md>), [testing](<https://devfeed.tech/tags/testing.md>), [workflow](<https://devfeed.tech/tags/workflow.md>)

### AI overview

Part 1 of a two-part tutorial on implementing a CI/CD workflow for a Serverless project, focusing on Mocha endpoint testing.

### Source excerpt

Part 1 of 2 on how to implement a CICD workflow for a Serverless project

## Learning How to Set Up Automated, Cross-browser JavaScript Unit Testing

DevFeed: [Learning How to Set Up Automated, Cross-browser JavaScript Unit Testing](<https://devfeed.tech/articles/learning-how-to-set-up-automated-cross-browser-javascript-unit-testing-29513.md>)

Original publisher: [Read original article](<https://philipwalton.com/articles/learning-how-to-set-up-automated-cross-browser-javascript-unit-testing/>)

Published: 2016-07-11T06:48:41Z

Content type: tutorial

Language: en

Sources: [Philip Walton](<https://devfeed.tech/sources/philip-walton.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Puppeteer](<https://devfeed.tech/topics/puppeteer.md>)

Tags: [automated](<https://devfeed.tech/tags/automated.md>), [browser](<https://devfeed.tech/tags/browser.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

A tutorial on understanding and building automated cross-browser JavaScript unit testing. It explains the manual testing workflow first, then shows how automation can handle repetitive steps while preserving an understanding of how the process works.

### Source excerpt

We all know how important it is to test our code in multiple browsers. And I think for the most part, we in the web development community do a pretty good job at this--at least when first releasing a project.