Tag

Jest

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 15, 2024 · Frontend Development

Automating Visual Regression Testing for Frontend Component Libraries with jest-image-snapshot and jest-puppeteer

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
Automating Visual Regression Testing for Frontend Component Libraries with jest-image-snapshot and jest-puppeteer
HelloTech
HelloTech
Jan 4, 2024 · Frontend Development

Introduction to Front-End Unit Testing with Jest

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.

JavaScriptJestTDD
0 likes · 14 min read
Introduction to Front-End Unit Testing with Jest
37 Interactive Technology Team
37 Interactive Technology Team
Dec 29, 2023 · Frontend Development

Why Unit Testing is Needed and How to Write Front‑End Unit Tests with Jest

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.

JestUnit TestingVue
0 likes · 14 min read
Why Unit Testing is Needed and How to Write Front‑End Unit Tests with Jest
ByteFE
ByteFE
Nov 15, 2023 · Frontend Development

Implementing Code Quality Assurance in Monorepos: Git Submodules for Unit Testing and Code Owner Mechanisms

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.

Code OwnersGit SubmoduleJest
0 likes · 11 min read
Implementing Code Quality Assurance in Monorepos: Git Submodules for Unit Testing and Code Owner Mechanisms
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 9, 2023 · Frontend Development

Comprehensive Guide to Building a React Component and Utility Library with dumi2 (Setup, Development, Testing, and Deployment)

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.

DocumentationJestReact
0 likes · 27 min read
Comprehensive Guide to Building a React Component and Utility Library with dumi2 (Setup, Development, Testing, and Deployment)
360 Tech Engineering
360 Tech Engineering
May 9, 2023 · Frontend Development

Why Use AI to Write Unit Tests for React Hooks

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.

AIHooksJest
0 likes · 10 min read
Why Use AI to Write Unit Tests for React Hooks
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 12, 2022 · Frontend Development

Implementing a Simplified Qiankun JavaScript Sandbox: Snapshot, Singular Proxy, and Multiple Proxy Sandboxes

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
Implementing a Simplified Qiankun JavaScript Sandbox: Snapshot, Singular Proxy, and Multiple Proxy Sandboxes
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 11, 2022 · Frontend Development

Testing React Hooks with Jest and React Testing Library

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.

HooksJavaScriptJest
0 likes · 16 min read
Testing React Hooks with Jest and React Testing Library
ByteFE
ByteFE
Jun 20, 2022 · Frontend Development

An Introduction to Frontend Testing: Types, Tools, and Best Practices

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.

E2EJestUnit Testing
0 likes · 22 min read
An Introduction to Frontend Testing: Types, Tools, and Best Practices
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 24, 2022 · Backend Development

How to Properly Create a Qualified npm Package with TypeScript: A Step‑by‑Step Guide

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.

ESLintJestTypeScript
0 likes · 15 min read
How to Properly Create a Qualified npm Package with TypeScript: A Step‑by‑Step Guide
ByteFE
ByteFE
Feb 25, 2022 · Frontend Development

Curated Recommendations: State of JS 2021, Cross‑Platform Tech, JIT, Vue Diff, Node.js, CSS, Three.js, Mermaid, Jest and More

This curated collection highlights the 2021 State of JS findings, cross‑platform technology insights, JIT compilation explanations, Vue diff algorithm visualizations, Node.js learning resources, and practical tutorials on CSS perspective, React + Three.js 3D effects, Mermaid diagrams in Markdown, and Jest testing, offering a comprehensive overview for modern front‑end developers.

JavaScriptJestNode.js
0 likes · 4 min read
Curated Recommendations: State of JS 2021, Cross‑Platform Tech, JIT, Vue Diff, Node.js, CSS, Three.js, Mermaid, Jest and More
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Feb 17, 2022 · Frontend Development

Master Frontend Component Testing with Jest and React Testing Library

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.

JestReact Testing LibraryUnit Testing
0 likes · 17 min read
Master Frontend Component Testing with Jest and React Testing Library
政采云技术
政采云技术
Dec 7, 2021 · Frontend Development

A Comprehensive Guide to Frontend Unit Testing with Jest and Mocha

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
A Comprehensive Guide to Frontend Unit Testing with Jest and Mocha
GrowingIO Tech Team
GrowingIO Tech Team
Aug 19, 2021 · Frontend Development

Choosing the Right React Testing Tool: Jest vs Enzyme vs RTL

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
Choosing the Right React Testing Tool: Jest vs Enzyme vs RTL
New Oriental Technology
New Oriental Technology
Jun 7, 2021 · Frontend Development

Introduction to Unit Testing with Jest and React Testing Library

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
Introduction to Unit Testing with Jest and React Testing Library
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Mar 3, 2021 · Frontend Development

Frontend Unit Testing Technical Solutions: A Comprehensive Guide

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
Frontend Unit Testing Technical Solutions: A Comprehensive Guide
37 Mobile Game Tech Team
37 Mobile Game Tech Team
Jan 29, 2021 · Frontend Development

Why Rollup Beats Webpack for Building a Simple JS Library

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
Why Rollup Beats Webpack for Building a Simple JS Library
Zhengtong Technical Team
Zhengtong Technical Team
Aug 14, 2020 · Frontend Development

A Practical Guide to Frontend Testing: Understanding TDD, BDD, and Mastering Jest

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 TestingJavaScript
0 likes · 12 min read
A Practical Guide to Frontend Testing: Understanding TDD, BDD, and Mastering Jest
Tencent Music Tech Team
Tencent Music Tech Team
Jun 12, 2020 · Frontend Development

Using Jest for Front-End Unit Testing and Coverage

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.

JavaScriptJestSnapshots
0 likes · 21 min read
Using Jest for Front-End Unit Testing and Coverage
Ctrip Technology
Ctrip Technology
Jan 16, 2020 · Frontend Development

Comprehensive Guide to Unit Testing in React and React Native Projects

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
Comprehensive Guide to Unit Testing in React and React Native Projects