Tagged articles
mocha
19 articles · Page 1 of 1
This article provides a detailed comparison of Jest and Mocha, covering their core features, performance, flexibility, ecosystem support, and ideal use‑cases, helping developers choose the most suitable JavaScript testing framework for front‑end or back‑end projects.
JavaScriptJestNode.js
0 likes · 16 min read

This guide explains why unit testing is essential, compares manual and automated testing, outlines the components of JavaScript test frameworks, and provides a step‑by‑step process for selecting the most suitable framework based on project needs and team capabilities.
JavaScriptJestmocha
0 likes · 9 min read

This article explains the backend technology choices for a low‑code poster platform, covering Node.js framework selection, database decisions (MySQL, MongoDB, Redis), authentication methods (Session vs JWT), and unit/integration testing tools such as Mocha, SuperTest, and related code examples.
BackendKoa2mocha
0 likes · 14 min read

This article walks through the design and implementation of a lightweight Mocha-like test framework for Node.js, covering automated testing concepts, core functions, asynchronous support, suite‑test tree construction, result collection, and verification with code examples and diagrams.
JavaScriptNode.jsTest Runner
0 likes · 26 min read


转转QAJan 19, 2022 · Frontend Development
This tutorial explains how to set up and use Puppeteer together with the Mocha test framework to create, run, and report UI automation test cases for web and H5 applications, covering installation, a demo script, selector handling, and visual test reporting.
Frontend DevelopmentJavaScriptNode.js
0 likes · 6 min read


政采云技术Dec 7, 2021 · Frontend Development
This article introduces the importance of frontend unit testing, presents survey data on current practices, compares popular frameworks like Jest and Mocha, provides step‑by‑step setup instructions, demonstrates code examples for JavaScript, TypeScript and async functions, and explains how to generate coverage reports and use common assertions.
CoverageJavaScriptJest
0 likes · 16 min read

This article shares a year‑long experience of UI automation at Youzan, covering how to select stable business scenarios, choose Puppeteer with Mocha, implement robust element locating, handle dynamic data via API interception, apply wait and retry mechanisms, capture screenshots, log responses, and integrate tests into CI pipelines for reliable regression testing.
API interceptionCI integrationFrontend Testing
0 likes · 13 min read

This guide surveys modern frontend unit‑testing solutions, comparing Node’s assert, Chai, Mocha, Jasmine, and Jest, explaining module formats, environment setups for Node, JSDOM, and real browsers, and detailing React testing with Jest + Enzyme’s shallow, mount, and render methods.
EnzymeJestKarma
0 likes · 25 min read


WecTeamJan 7, 2020 · Frontend Development
Learn how to write comprehensive tests for Vue applications—including unit, integration, and end-to-end tests—using Vue CLI, Mocha, Chai, Vue Test Utils, Vuex, Vue Router, Sinon, and Cypress, with practical code examples that demonstrate test setup, mocking, and browser verification.
CypressEnd-to-EndIntegration Tests
0 likes · 17 min read


WecTeamOct 9, 2019 · Backend Development
This article walks through creating a lightweight Mocha‑like testing framework in JavaScript, covering BDD‑style APIs, directory layout, suite and test class design, hook handling, asynchronous support, a runner that traverses the suite‑test tree, and a reporter that outputs test results.
BDDJavaScriptNode.js
0 likes · 21 min read

This article explores four key questions about automated testing: what it is, why it matters, which projects benefit from it, and how to implement it, providing a complete frontend testing framework including unit testing, API testing, functional testing, and benchmark testing.
API TestingFrontend TestingReact Testing
0 likes · 16 min read

This guide explains how to set up Mocha for TypeScript unit testing, configure NYC for coverage reporting, and integrate both tools within a Lerna monorepo to maintain high branch coverage across multiple packages.
LernaTypeScriptcode coverage
0 likes · 5 min read

This article explores why unit testing is essential for frontend projects, compares Mocha and Jest across assertions, coverage, environment setup, mocking, snapshots, and watch mode, and offers practical guidance on choosing tools, writing maintainable tests, and balancing coverage with development speed.
CoverageJavaScriptJest
0 likes · 19 min read

This guide explains how to use Selenium WebDriver with headless Chrome, integrate BrowserStack and chromedriver, and combine Mocha, Chai, and Karma to write, configure, and run automated front‑end tests, including sample code and troubleshooting tips.
Frontend TestingKarmachai
0 likes · 11 min read

This article explains why test cases are essential for high‑quality, maintainable code, compares TDD and BDD agile models, and introduces key frontend testing tools such as Mocha, Should.js, Nock, Istanbul, and mochawesome with practical usage examples.
BDDFrontend TestingTDD
0 likes · 6 min read

This tutorial walks through creating a simple REST API with POST, GET, PUT, and DELETE endpoints using Node.js, Express, MongoDB, and Mocha, demonstrating a test‑driven development workflow from writing tests to implementing passing code.
ExpressMongoDBNode.js
0 likes · 10 min read

This guide explains why test cases are essential, compares TDD and BDD agile approaches, and introduces key frontend testing tools—including Mocha for test suites, Should for assertions, Nock for HTTP mocking, and Istanbul for coverage—while providing code examples and best‑practice recommendations for writing maintainable, high‑quality tests.
BDDFrontend DevelopmentJavaScript
0 likes · 8 min read

Learn how to achieve comprehensive code coverage for multi‑process Node.js applications by using Istanbul, instrumenting child processes, writing Mocha tests, and merging coverage reports, with detailed examples of master‑worker RPC, custom fork hacks, and package.json scripts for automated testing.
IstanbulNode.jscode coverage
0 likes · 12 min read

Front‑end developer Xiao Ming discovers how unit testing with TDD/BDD, Mocha, and various assertion libraries can ensure reliable Node.js deployments, prevent regressions, and enable confident refactoring, while also learning to measure coverage with Istanbul.
BDDNode.jsTDD
0 likes · 7 min read
