T
traeai
登录
返回首页
InfoQ

Vitest 4.1: Test Tags, Native Node.js Execution and AI Agent Reporter

8.7Score
Vitest 4.1: Test Tags, Native Node.js Execution and AI Agent Reporter
AI 深度提炼
  • test.only()可按语义标签批量筛选用例
  • 移除依赖V8快照,启动更快且更易调试
  • AI Reporter自动归因失败原因并建议修复路径
#Vitest#JavaScript Testing#AI Tooling#Node.js
打开原文

Vitest 4.1: Test Tags, Native Node.js Execution and AI Agent Reporter - InfoQ

Your choice regarding cookies on this site

We use cookies to optimise site functionality and give you the best possible experience.

I Accept I Do Not Accept Settings

[BT](http://www.infoq.com/int/bt/ "bt")

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

Enter your e-mail address

Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.

We protect your privacy.

Close

Live Webinar and Q&A: Shipping Faster, Breaking More: Rethinking Delivery Systems in the Age of AI (May 28, 2026)Save Your Seat

Close

Toggle Navigation

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

English edition

[Write for InfoQ](http://www.infoq.com/write-for-infoq/ "Write for InfoQ")

Search

RegisterSign in

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In

or

Don't have an InfoQ account?

Register

  • **Stay updated on topics and peers that matter to you**Receive instant alerts on the latest insights and trends.
  • **Quickly access free resources for continuous learning**Minibooks, videos with transcripts, and training materials.
  • **Save articles and read at anytime**Bookmark articles to read whenever youre ready.

Logo - Back to homepage

NewsArticlesPresentationsPodcastsGuides

Topics

[Development](http://www.infoq.com/development/ "Development")

  • [Java](http://www.infoq.com/java/ "Java")
  • [Kotlin](http://www.infoq.com/kotlin/ "Kotlin")
  • [.Net](http://www.infoq.com/dotnet/ ".Net")
  • [C#](http://www.infoq.com/c_sharp/ "C#")
  • [Swift](http://www.infoq.com/swift/ "Swift")
  • [Go](http://www.infoq.com/golang/ "Go")
  • [Rust](http://www.infoq.com/rust/ "Rust")
  • [JavaScript](http://www.infoq.com/javascript/ "JavaScript")

Featured in Development

Dany Lepage discusses the architectural journey of porting a hit VR title to seven non-VR platforms. He explains how his team solved the challenges of cross-progression, diverse input paradigms, and maintaining release velocity across Steam, iOS, and PlayStation. Beyond the tech, he shares candid lessons on the "product fit" gap when translating immersive social presence to 2D screens.

![Image 2: From VR to Flat Screens: Bridging the Input and Immersion Gap/presentations/game-vr-flat-screens/en/smallimage/thumbnail-1775637585504.jpg)](http://www.infoq.com/presentations/game-vr-flat-screens)

All in developmentFollow Topic

[Architecture & Design](http://www.infoq.com/architecture-design/ "Architecture & Design")

  • [Architecture](http://www.infoq.com/architecture/ "Architecture")
  • [Enterprise Architecture](http://www.infoq.com/enterprise-architecture/ "Enterprise Architecture")
  • [Scalability/Performance](http://www.infoq.com/performance-scalability/ "Scalability/Performance")
  • [Design](http://www.infoq.com/design/ "Design")
  • [Case Studies](http://www.infoq.com/Case_Study/ "Case Studies")
  • [Microservices](http://www.infoq.com/microservices/ "Microservices")
  • [Service Mesh](http://www.infoq.com/servicemesh/ "Service Mesh")
  • [Patterns](http://www.infoq.com/DesignPattern/ "Patterns")
  • [Security](http://www.infoq.com/Security/ "Security")

Featured in Architecture & Design

Jimmy Morzaria discusses the evolution of Stripe’s database tier to support 5 million QPS with 5.5 nines of reliability. He explains the architecture of DocDB and shares how Stripe leverages a custom zero-downtime data movement platform to perform horizontal sharding, version upgrades, and multi-tenant migrations - all while maintaining the strict consistency required for global commerce.

![Image 3: Stripe’s Docdb: How Zero-Downtime Data Movement Powers Trillion-Dollar Payment Processing/presentations/docdb-online-database/en/smallimage/jimmy-morzaria-thumbnail-1776864724742.jpeg)](http://www.infoq.com/presentations/docdb-online-database)

All in architecture-designFollow Topic

[AI Infrastructure](http://www.infoq.com/ai-ml-data-eng/ "AI Infrastructure")

  • [Big Data](http://www.infoq.com/bigdata/ "Big Data")
  • [Machine Learning](http://www.infoq.com/machinelearning/ "Machine Learning")
  • [NoSQL](http://www.infoq.com/nosql/ "NoSQL")
  • [Database](http://www.infoq.com/database/ "Database")
  • [Data Analytics](http://www.infoq.com/data-analytics/ "Data Analytics")
  • [Streaming](http://www.infoq.com/streaming/ "Streaming")

Featured in AI, ML & Data Engineering

Hilary Mason shares her journey from academia to building AI products at scale. She discusses the shift from discrete engineering to probabilistic mindsets, explaining why managing "human considerations" is the hardest part of the stack. She explains the "existential crisis" for engineers, arguing that great architecture today is about context management, systems thinking, and good taste.

![Image 4: The Next Generation of AI Products/presentations/ai-products/en/smallimage/hilary-mason-thumbnail-1776947360498.jpeg)](http://www.infoq.com/presentations/ai-products)

All in ai-ml-data-engFollow Topic

[Culture & Methods](http://www.infoq.com/culture-methods/ "Culture & Methods")

  • [Agile](http://www.infoq.com/agile/ "Agile")
  • [Diversity](http://www.infoq.com/diversity/ "Diversity")
  • [Leadership](http://www.infoq.com/leadership/ "Leadership")
  • [Lean/Kanban](http://www.infoq.com/lean/ "Lean/Kanban")
  • [Personal Growth](http://www.infoq.com/personal-growth/ "Personal Growth")
  • [Scrum](http://www.infoq.com/scrum/ "Scrum")
  • [Sociocracy](http://www.infoq.com/sociocracy/ "Sociocracy")
  • [Software Craftmanship](http://www.infoq.com/software_craftsmanship/ "Software Craftmanship")
  • [Team Collaboration](http://www.infoq.com/team-collaboration/ "Team Collaboration")
  • [Testing](http://www.infoq.com/testing/ "Testing")
  • [UX](http://www.infoq.com/ux/ "UX")

Featured in Culture & Methods

The panelists share insights on evolving company culture. They discuss leveraging feedback loops, lending social capital, and the friction between legacy bureaucracy and agile engineering. The panel explains how to maintain cohesion in remote teams and use interviews to uncover the true "unmanicured" culture of a firm.

![Image 5: Panel: Building a Culture that Works/presentations/panel-positive-culture/en/smallimage/ln-500x500-1775048593311.jpg)](http://www.infoq.com/presentations/panel-positive-culture)

All in culture-methodsFollow Topic

DevOps

  • [Infrastructure](http://www.infoq.com/infrastructure/ "Infrastructure")
  • [Continuous Delivery](http://www.infoq.com/continuous_delivery/ "Continuous Delivery")
  • [Automation](http://www.infoq.com/automation/ "Automation")
  • [Containers](http://www.infoq.com/containers/ "Containers")
  • [Cloud](http://www.infoq.com/cloud-computing/ "Cloud")
  • [Observability](http://www.infoq.com/observability/ "Observability")

Featured in DevOps

The presenters discuss incident response, how AI-enhanced SRE platforms connect signals from logs, metrics, traces, and historical incidents to enable autonomous decisions.

![Image 6: AI-Powered SRE for Autonomous Incident Response/presentations/ai-sre-incident-response/en/smallimage/infoq-live-thumbnail-1777368469045.jpg)](http://www.infoq.com/presentations/ai-sre-incident-response)

All in devopsFollow Topic

[Events](https://events.infoq.com/ "Events")

Helpful links

  • [About InfoQ](http://www.infoq.com/about-infoq "About InfoQ")
  • [InfoQ Editors](http://www.infoq.com/infoq-editors "InfoQ Editors")
  • [Write for InfoQ](http://www.infoq.com/write-for-infoq "Write for InfoQ")
  • [About C4Media](https://c4media.com/ "About C4Media")
  • [Diversity](https://c4media.com/diversity "Diversity")

Choose your language

  • [En](http://www.infoq.com/news/2026/05/vitest-4-1-ai-agents/# "InfoQ English")
  • 中文
  • 日本
  • Fr

![Image 7: InfoQ Architect Certification - image Online InfoQ Architect Certification Join Luca Mezzalira for this 5-week online cohort. Master socio-technical architecture leadership. **Register Now.**](https://certification.qconferences.com/?utm_source=infoq&utm_medium=referral&utm_campaign=homepageheader_onlinecohortaprmayjun26)![Image 8: QCon AI Boston - image QCon AI Boston Learn how leading engineering teams run AI in production—reliably, securely, and at scale. **Early Bird ends April 14.**](https://boston.qcon.ai/?utm_source=infoq&utm_medium=referral&utm_campaign=homepageheader_qaiboston26)![Image 9: QCon San Francisco - image QCon San Francisco Learn what's next in AI and software, from teams already doing it. **Early Bird ends April 14.**](https://qconsf.com/?utm_source=infoq&utm_medium=referral&utm_campaign=homepageheader_qsf26)

[InfoQ Homepage](http://www.infoq.com/ "InfoQ Homepage")[News](http://www.infoq.com/news "News")Vitest 4.1: Test Tags, Native Node.js Execution and AI Agent Reporter

[Web Development](http://www.infoq.com/Web-Development/ "Web Development")

Architecting for Autonomous Reliability: Embedding AI into Your Observability Stack (Webinar Jun 25th)

Vitest 4.1: Test Tags, Native Node.js Execution and AI Agent Reporter

May 01, 2026 2 min read

by

Follow UI Development Manager at Griffiths Waite

#### Write for InfoQ

**Feed your curiosity.**Help 550k+ global

senior developers

each month stay ahead.Get in touch

Log in to listen to this article

Loading audio

Your browser does not support the audio element.

0:00 0:00

Normal 1.25x 1.5x

Like

Vitest, the Vite-native testing framework maintained by VoidZero, has released Vitest 4.1, delivering a collection of new features, and tooling enhancements aimed at making JavaScript testing more organized and closer to production.

Vitest 4.1 introduces several notable additions, including test tags for filtering and configuring groups of tests, an experimental mode to bypass Vite's module runner entirely, new lifecycle hooks, improved type inference in test fixtures, and a dedicated reporter for AI coding agents. The release also ships with full Vite 8 support from day one.

One of the standout features is test tags, inspired by Python's pytest markers. Tags allow developers to label tests and apply shared configuration such as timeouts or retries per tag. The feature was a requested addition, with a GitHub issue from October 2025 noting that "I come from Pytest, and simply marking tests is a feature I greatly miss in most test frameworks." The filtering syntax supports logical operators and wildcards, enabling patterns like `vitest --tags-filter="frontend && !flaky"` to run frontend tests while excluding unreliable ones.

Another significant addition is the experimental `viteModuleRunner: false` option, which disables Vite's module runner sandbox and runs tests using native Node.js `import`. No file transforms are applied, resulting in faster startup and closer-to-production behavior. For developers on Node.js 22.18+ or 23.6+, TypeScript is stripped natively with no extra configuration. A discussion on the Vitest GitHub confirmed the option also works with Bun but notes some missing features:

The only missing features I have noticed so far are:
* Module mocks - Easy to workaround using native mocks from`bun:test`import,
* Coverage - Won't work until Bun exposes custom coverage API or adds support for V8 APIs (unlikely?)

The release introduces `aroundEach` and `aroundAll` hooks for wrapping tests in contexts such as database transactions or tracing spans, and a new `test.extend` builder pattern that supports type inference without manual type declarations.

For CI workflows, the built-in `github-actions` reporter now generates a Job Summary with test statistics and flaky test highlights. A new `agent` reporter reduces token usage when Vitest detects it is running inside an AI coding agent, suppressing output for passing tests and console logs.

A few GitHub issues were raised following the release, and have since been fixed, one reported that coverage ignore hints (`v8 ignore if`, `v8 ignore next`) stopped working in 4.1.0 unless the `@preserve` annotation was added, representing a regression from earlier versions. A separate issue flagged that the updated Vite peer dependency syntax broke installations for Yarn Classic (v1.x) users.

Compared to Jest, Vitest continues to widen the performance gap. A SitePoint benchmark of a 50,000-test production monorepo reported faster cold starts, faster watch mode re-runs, alongside lower peak memory usage. For teams considering migration, Vitest provides a migration guide covering the transition from both Jest and earlier Vitest versions, noting its API remains Jest-compatible by design.

Vitest is an open-source testing framework maintained by VoidZero. It builds on Vite to reuse the same configuration, resolve, and transform pipelines, making it a natural fit for Vite-based projects while also supporting standalone use with frameworks like React, Angular, Vue, and Node.js.

About the Author

![Image 11](http://www.infoq.com/profile/Daniel-Curtis/)

#### **Daniel Curtis**

Daniel Curtis is a UI Development Manager at Griffiths Waite, a software consultancy based in Birmingham, UK. He leads front-end engineering efforts with a strong focus on delivering innovative enterprise solutions using TypeScript across the stack. Daniel is passionate about modern web architecture, developer experience, and the use of AI to both support software delivery and solve real customer problems within products.

Show more Show less

#### This content is in the Web Development topic

Follow Topic

##### Related Topics:

Followers: 4093

Follow Topic

Followers: 102

Follow Topic

Followers: 61

Follow Topic

Followers: 444

Follow Topic

Followers: 954

Follow Topic

* #### Related Editorial

* #### Related Sponsors

  • #### Related Sponsor

![Image 12: Related sponsor icon/filters:no_upscale()/sponsorship/topic/ad80a710-b4db-4a6e-a702-28ca161a5276/AblyLogoMicrosite-1774947433903.jpg)](http://www.infoq.com/url/f/04403af0-a7a1-4c42-a81d-fb03b2e1db18/)**Drop in Ably AI Transport.**

Purpose-built infrastructure for the entire agent-to-user experience. **Start building.**

Related Content

Apr 29, 2026

Apr 27, 2026

Apr 17, 2026

Apr 30, 2026

Apr 03, 2026

Apr 02, 2026

Apr 30, 2026 ![Image 13: Icon image/articles/dpop-key-storage-unsolved-problem/en/smallimage/dpop-key-storage-unsolved-problem-thumbnail-1777296488937.jpg)](http://www.infoq.com/articles/dpop-key-storage-unsolved-problem/)

Apr 29, 2026

Apr 28, 2026

Related Sponsors

Explore the missing “session layer” in the AI stack—where many production failures originate. This framework outlines maturity stages for delivering continuous, stateful AI experiences, from fragile HTTP streaming to resilient, multi-device, real-time systems with durable sessions. Read Now.

Every AI team hits the same wall and builds the same workaround. That's not a you problem. It's a missing layer. Read Now.

  • Sponsored by

![Image 16: Icon image/filters:no_upscale()/sponsorship/topic/ad80a710-b4db-4a6e-a702-28ca161a5276/AblyLogoMicrosite-1774947433903.jpg)](http://www.infoq.com/url/f/04403af0-a7a1-4c42-a81d-fb03b2e1db18/)

Related Content

Apr 23, 2026

Apr 21, 2026

Apr 20, 2026

Apr 20, 2026 ![Image 17: Icon image/articles/building-trpc-api-typescript/en/smallimage/building-trpc-api-typescript-thumbnail-1776246612091.jpg)](http://www.infoq.com/articles/building-trpc-api-typescript/)

Apr 18, 2026

Apr 17, 2026 ![Image 18: Icon image/presentations/optimize-performance-cx-platform/en/smallimage/Matheus-Albuquerque-thumbnail-1775047866586.jpg)](http://www.infoq.com/presentations/optimize-performance-cx-platform/)

**The InfoQ** Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

Enter your e-mail address

Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.

We protect your privacy.

  • ##### [QCon San Francisco 2026: 12 Tracks Announced](http://www.infoq.com/news/2026/04/qconsf-2026-tracks-announced/ "QCon San Francisco 2026: 12 Tracks Announced")
  • ##### [Microsoft's Russinovich and Hanselman Warn AI Is Hollowing out the Junior Developer Pipeline](http://www.infoq.com/news/2026/04/junior-developer-pipeline-crisis/ "Microsoft's Russinovich and Hanselman Warn AI Is Hollowing out the Junior Developer Pipeline")
  • ##### [C++26: Reflection, Memory Safety, Contracts, and a New Async Model](http://www.infoq.com/news/2026/04/cpp-26-reflection-safety-async/ "C++26: Reflection, Memory Safety, Contracts, and a New Async Model")
  • ##### [Confluent Moves Schema IDs to Kafka Headers to Simplify Schema Governance](http://www.infoq.com/news/2026/05/confluent-kafka-header-schema-id/ "Confluent Moves Schema IDs to Kafka Headers to Simplify Schema Governance")
  • ##### [Meta's Approach to Migrating their Systems to Post-Quantum Cryptography](http://www.infoq.com/news/2026/04/meta-quantum-crypto-migration/ "Meta's Approach to Migrating their Systems to Post-Quantum Cryptography")
  • ##### [Stripe’s Docdb: How Zero-Downtime Data Movement Powers Trillion-Dollar Payment Processing](http://www.infoq.com/presentations/docdb-online-database/ "Stripe’s Docdb: How Zero-Downtime Data Movement Powers Trillion-Dollar Payment Processing")
  • ##### [Driving and Measuring the Impact of Platform Engineering](http://www.infoq.com/news/2026/04/measure-platform-engineering/ "Driving and Measuring the Impact of Platform Engineering")
  • ##### [How Observability and Telemetry Can Enhance the Practice of Software Engineering](http://www.infoq.com/news/2026/04/observability-telemetry/ "How Observability and Telemetry Can Enhance the Practice of Software Engineering")
  • ##### [Panel: Building a Culture that Works](http://www.infoq.com/presentations/panel-positive-culture/ "Panel: Building a Culture that Works")
  • ##### [The Next Generation of AI Products](http://www.infoq.com/presentations/ai-products/ "The Next Generation of AI Products")
  • ##### [NVIDIA Launches Ising Open Models for Quantum Computing](http://www.infoq.com/news/2026/04/nvidia-ising-quantum/ "NVIDIA Launches Ising Open Models for Quantum Computing")
  • ##### [Vercel Releases Open Agents to Support Background AI Coding Workflows](http://www.infoq.com/news/2026/04/vercel-open-agents/ "Vercel Releases Open Agents to Support Background AI Coding Workflows")
  • ##### [Meta Deploys Unified AI Agents to Automate Performance Optimization at Hyperscale](http://www.infoq.com/news/2026/05/meta-ai-agents-hyperscale/ "Meta Deploys Unified AI Agents to Automate Performance Optimization at Hyperscale")
  • ##### [Broadcom Donates Velero to CNCF, Shifting Kubernetes Backup to Community Governance](http://www.infoq.com/news/2026/05/broadcom-velero-cncf/ "Broadcom Donates Velero to CNCF, Shifting Kubernetes Backup to Community Governance")
  • ##### [Dropbox Redesigns Compaction to Reclaim Space from Underfilled Storage Volumes](http://www.infoq.com/news/2026/04/dropbox-tiered-compaction/ "Dropbox Redesigns Compaction to Reclaim Space from Underfilled Storage Volumes")

**The InfoQ** Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

  • Get a quick overview of content published on a variety of innovator and early adopter technologies
  • Learn what you don’t know that you don’t know
  • Stay up to date with the latest information from the topics you are interested in

Enter your e-mail address

Select your country - [x] I consent to InfoQ.com handling my data as explained in this Privacy Notice.

We protect your privacy.

**May 7 | June 10, 2026 | Online** Architecture decisions are hard to validate while shipping. Join a **5-week online cohort** for **senior engineers, architects, and team leads** to pressure-test real decisions, apply practical frameworks, and work through challenges with a confidential peer group. Facilitated by Luca Mezzalira, Principal Architect at AWS, this cohort helps you: * Pressure-test real decisions. * Apply frameworks to real problems. * Publish on InfoQ.com and earn your certification. **RESERVE YOUR PLACE**

[Home](http://www.infoq.com/ "Home")[Create account](http://www.infoq.com/reginit.action "Create account")Log In[QCon Conferences](http://qconferences.com/ "QCon Conferences")Events[Write for InfoQ](http://www.infoq.com/write-for-infoq/ "Write for InfoQ")[InfoQ Editors](http://www.infoq.com/infoq-editors/ "InfoQ Editors")[About InfoQ](http://www.infoq.com/about-infoq/ "About InfoQ")[About C4Media](https://c4media.com/ "About C4Media")[Media Kit](https://get.infoq.com/infoq-mediakit/ "Media Kit")[InfoQ Developer Marketing Blog](https://devmarketing.c4media.com/?utm_source=infoq "InfoQ Developer Marketing Blog")[Diversity](https://c4media.com/diversity "Diversity")

#### Events

May 7, 2026

June 1-2, 2026

June 10, 2026

November 16-20, 2026

#### Follow us on

Youtube 232K FollowersLinkedin 26K FollowersInstagram NewRSS 19K ReadersX 57.1k FollowersFacebook 21K LikesBluesky New

#### Stay in the know

The InfoQ Podcast![Image 19: The InfoQ Podcast Logo - Stay in the know](http://www.infoq.com/podcasts/)Engineering Culture Podcast![Image 20: Engineering Culture Podcast Logo - Stay in the knoww](http://www.infoq.com/podcasts/#engineering_culture)The Software Architects' Newsletter![Image 21: The Software Architects' Newsletter Logo - Stay in the know](http://www.infoq.com/software-architects-newsletter/)

General Feedback [feedback@infoq.com](mailto:feedback@infoq.com) Advertising [sales@infoq.com](mailto:sales@infoq.com) Editorial [editors@infoq.com](mailto:editors@infoq.com) Marketing [marketing@infoq.com](mailto:marketing@infoq.com)

InfoQ.com and all content copyright © 2006-2026 C4Media Inc.

Privacy Notice, Terms And Conditions, Cookie Policy

Close

[BT](http://www.infoq.com/int/bt/ "bt")

问问这篇内容

回答仅基于本篇材料
    0 / 500

    Skill 包

    领域模板,一键产出结构化笔记
    • 论文精读包

      把一篇论文 / 技术博客精读成结构化笔记:问题、方法、实验、批判、延伸阅读。

      • · TL;DR(1 段)
      • · 研究问题与动机
      • · 方法概览
    • 投融资雷达包

      把一条融资 / 创投新闻整理成投资人视角的雷达卡:交易要点、判断、竞争格局、风险、尽调清单。

      • · 交易要点(公司 / 轮次 / 金额 / 投资人 / 估值,材料未明示则写 “未披露”)
      • · 投资 thesis(这家公司为什么值得关注)
      • · 竞争格局与替代方案

    导出到第二大脑

    支持 Notion / Obsidian / Readwise
    下载 Markdown(Obsidian 直接拖入)