Tagged articles
Jest
40 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 article explains how to use custom Babel plugins to automatically inject try/catch blocks into massive Jest‑based UI automation test suites, improving error visibility, reducing manual effort, and maintaining code readability without invasive changes to existing JavaScript code.
BabelJavaScriptJest
0 likes · 10 min read

This article details a practical transformation from manual to automated testing using Jest and BDD‑generated HTA, explaining the challenges, technical solutions, mock‑data management, pipeline integration, and measurable results such as higher coverage, lower development cost, and faster release cycles.
BDDCI/CDHTA
0 likes · 28 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 guide explains how to configure Jest test scripts in a package.json file and use npm commands to run the full test suite, generate coverage reports, watch for changes, and target individual test files or cases for faster, more focused development.
JavaScriptJestcli
0 likes · 6 min read

This article explains how to set up and use jest-image-snapshot together with jest-puppeteer to automate visual regression testing for atomic frontend components, covering configuration, code examples, CI integration, and best practices for preventing unintended UI changes.
Frontend TestingJestPuppeteer
0 likes · 24 min read

This guide introduces front‑end unit testing with Jest, explaining TDD and BDD concepts, installation, writing simple and ES6/TypeScript tests, configuring coverage, using common matchers, and employing mock functions, timers, and module mocking to ensure reliable, maintainable code.
JestMockingTDD
0 likes · 14 min read

Unit testing prevents recurring bugs in large front‑end projects by forcing modular, testable code, and with Jest—especially for Vue—developers can quickly write, run, and enforce comprehensive tests covering props, methods, slots, Vuex, and coverage thresholds, while AI tools can scaffold boilerplate test files.
Jestfrontendtest coverage
0 likes · 14 min read


ByteFENov 15, 2023 · Frontend Development
This article outlines a comprehensive strategy for ensuring code quality within monorepo architectures by isolating unit tests via Git submodules, automating test execution in CI pipelines, and enforcing structured code reviews through a configurable Code Owner mechanism to mitigate integration risks.
CI/CDCode OwnersJest
0 likes · 11 min read

This article provides a step‑by‑step tutorial on using dumi2 to create a React component and function library, covering project initialization, component and style development, documentation generation, Jest unit testing, Ant Design integration, utility functions, test optimization, and final packaging and deployment to both a static site and npm.
JestTypeScriptcomponent library
0 likes · 27 min read


政采云技术May 17, 2023 · Frontend Development
This article explains automated testing concepts, compares unit, integration, TDD and BDD approaches, shows how to write Jest test cases without a framework, configure Jest, use matchers, handle async code, hooks, mocks, timers, snapshots, DOM testing, and provides practical code examples and repository links.
Frontend TestingJestMocking
0 likes · 28 min read

This article explains the motivation for writing unit tests for shared React hook modules, demonstrates how an AI assistant in the Cursor IDE can generate Jest test cases from a repository, and details the step‑by‑step process of configuring the environment, fixing failing tests, and reflecting on AI's current limitations.
AIJestReact
0 likes · 10 min read

This article explains why unit testing is essential for reusable components, introduces Jest fundamentals, demonstrates how to write and run tests with code examples, and shows how to enhance UI component testing using @testing-library/react, @testing-library/user-event, and @testing-library/jest-dom, providing a complete workflow for reliable front‑end development.
JestMockfrontend
0 likes · 12 min read

This article walks through building a lightweight Qiankun JS sandbox by first explaining sandbox principles, then creating a snapshot sandbox, a singular proxy sandbox that records changes via ES6 Proxy, and finally a multiple‑proxy sandbox that isolates each micro‑frontend with its own fake window, complete with test cases and setup instructions.
JavaScriptJestMicro Frontends
0 likes · 16 min read

This article provides a comprehensive guide on unit testing custom React Hooks using Jest, renderHook, act, and the React Testing Library, covering examples such as useCounter, useEventListener, useHover, and useMouse with detailed code snippets and best‑practice recommendations.
JavaScriptJestReact
0 likes · 16 min read

This comprehensive guide explains why automated testing is essential for frontend development, outlines the differences between unit, integration, component, and end‑to‑end testing, and recommends practical tools and frameworks such as Jest, Vitest, Testing Library, Cypress, Playwright, and Puppeteer.
CypressJeste2e
0 likes · 21 min read


ByteFEJun 20, 2022 · Frontend Development
This article explains what frontend testing is, why it is essential, outlines the various testing types such as unit, integration, end‑to‑end, acceptance, visual regression, accessibility, performance and cross‑browser testing, recommends tools like Jest and Puppeteer, and offers practical advice for building an effective testing strategy.
Jestautomatione2e
0 likes · 22 min read

This article walks readers through the complete process of building a well‑structured npm package using TypeScript, covering project initialization, package.json configuration, essential tooling such as husky, lint‑staged, eslint, prettier, unit testing with Jest, and best practices for documentation and publishing.
ESLintJestLibrary
0 likes · 15 min read

This article walks through the fundamentals of front‑end unit testing, covering why tests matter, popular frameworks like Jest, core APIs, mocking techniques, and how to use React Testing Library to render components, query elements, and simulate user events for reliable, maintainable code.
JestMockingReact Testing Library
0 likes · 17 min read

This guide details Sentry's comprehensive testing strategy, covering devservices setup, Python pytest workflows, factory-based data creation, feature flag handling, SQL logging, Selenium acceptance tests, visual regression, Jest frontend tests, API fixtures, and Kafka integration within CI pipelines.
CIDevservicesJest
0 likes · 13 min read

This guide introduces unit testing for frontend projects, explains its benefits, compares popular frameworks like Jest, Mocha, and Karma, and provides step‑by‑step instructions for installing and configuring Jest with Vue Test Utils, including code examples and best‑practice tips.
JestTest Automationfrontend
0 likes · 9 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 compares React component testing approaches, explains the difference between unit testing and end‑to‑end testing, evaluates popular tools such as Jest, Enzyme, and React Testing Library, and provides practical code examples, snapshot testing tips, and integration with Storybook.
EnzymeJestReact
0 likes · 12 min read

This article explains the concept of unit testing, introduces the Jest framework and its configuration, demonstrates common APIs, matchers, asynchronous testing, mocking, coverage reporting, and shows how to test React components using React Testing Library with practical code examples.
JavaScriptJestReact Testing Library
0 likes · 18 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

This article compares Webpack and Rollup, explains why Rollup’s tree‑shaking and ES6 module support make it better for a lightweight JavaScript utility library, and provides a step‑by‑step guide to set up the project with TypeScript, ESLint, Prettier, Husky, Commitlint and Jest testing.
ESLintJavaScriptJest
0 likes · 14 min read

This article explains why unit testing is essential, introduces VSCode plugins and Jest configurations that speed up test execution, outlines common testing pitfalls, and details practical test‑case design methods such as equivalence partitioning, boundary‑value analysis, and error‑guessing, while also covering stubs, mocks, and CI integration.
CoverageJestMock
0 likes · 18 min read

This article explores the core principles of frontend testing, comparing Test-Driven Development and Behavior-Driven Development methodologies while providing a step-by-step tutorial on configuring the Jest framework and utilizing its essential matchers to write robust, maintainable unit tests for modern web applications.
Behavior Driven DevelopmentFrontend TestingJest
0 likes · 12 min read

The article explains how to set up Jest for front‑end unit testing, demonstrates basic test writing, async handling, hooks, snapshot and React component testing, shows coverage configuration and thresholds, compares Jest’s built‑in features to Mocha’s limitations, and offers tips on concurrency, mocking, and test‑driven development.
JavaScriptJestMocking
0 likes · 21 min read

This article walks through setting up a comprehensive testing workflow for a Node.js backend, covering Jest configuration, unit and integration tests with SuperTest, in‑memory MongoDB, login helpers, mocking, snapshot testing, coverage reporting, CI integration, and the adoption of TDD/BDD practices.
CIJestMongoDB
0 likes · 22 min read

This article presents a complete tutorial on setting up and using Jest, Enzyme, and react‑hooks‑testing‑library for unit testing React and React Native applications, covering environment configuration, simple function tests, lifecycle hooks, mocking, snapshot testing, asynchronous tests, Redux and Hook testing, as well as coverage reporting and CI integration.
EnzymeJestReact
0 likes · 13 min read

The article examines modern frontend engineering by detailing its four‑stage lifecycle—development, testing, deployment, maintenance—and reviewing modularization of JavaScript and CSS, component‑based frameworks and Web Components, code and workflow standardization, automation tools, and a real‑world migration to ES6 modules, Rollup, CSS Modules, Jest, and CI pipelines.
Build ToolsCI/CDCSS Modules
0 likes · 40 min read

This guide explains why and how to automate testing for WeChat mini‑programs using the miniprogram‑automator tool, covering setup commands, Jest integration, selector quirks, video playback verification, and a comprehensive checklist of supported test cases and current limitations.
Automation TestingJestUI testing
0 likes · 17 min read

This tutorial walks you through using Jest, a fluent Java HTTP client for Elasticsearch, covering Maven setup, creating a reusable client, performing CRUD operations, bulk and asynchronous requests, and showcases code examples that illustrate how to manage indices and documents efficiently.
ClientElasticsearchJava
0 likes · 12 min read

This article provides a comprehensive guide to using Jest for front‑end unit testing, covering the lack of tests, benefits, installation, basic assertions, matchers, asynchronous testing, lifecycle hooks, mock functions, module mocking, snapshot testing, and best practices to improve code quality and development efficiency.
JavaScriptJestMocking
0 likes · 15 min read

Create React App 2.0, launched on October 1, updates core tools like Babel, Webpack, and Jest, adds Sass, CSS Modules, SVG components, optional Service Workers, and provides a clear migration path for both new and existing projects, while supporting modern browsers and optional polyfills.
BabelJestReact
0 likes · 6 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 article explains the fundamentals of unit testing, including its importance, various test types, tool categories, implementation principles, hooks, best‑practice guidelines, and introduces the Jest JavaScript testing framework with installation steps, features, and example test scripts for both synchronous and asynchronous code.
BDDJavaScriptJest
0 likes · 9 min read

This tutorial walks through setting up a TypeScript project with React, covering installation, tsconfig configuration, Webpack and Babel integration, creating a simple component, adding type declarations for third‑party modules, testing with Jest and ts‑jest, and enforcing code style with TSLint.
BabelFrontend DevelopmentJest
0 likes · 16 min read

This article explains why web releases often miss thorough testing, introduces Jest and its React support, and provides a step‑by‑step guide to implementing snapshot testing and improving unit‑test coverage in modern React applications.
JestReactsnapshot testing
0 likes · 5 min read
