<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl" -->

---
title: Gutenberg’s JavaScript unit and integration tests now...
description: Gutenberg's JavaScript unit and integration tests have migrated from Jest to Vitest, gaining native ESM support and real-browser component testing via Vitest's...
canonical: https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Gutenberg’s JavaScript unit and integration tests now use Vitest | daily.dev
og:description: Gutenberg's JavaScript unit and integration tests have migrated from Jest to Vitest, gaining native ESM support and real-browser component testing via Vitest's...
og:url: https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl
og:image: https://api.daily.dev/og/posts/A3aHEM6tL.png
og:image:alt: Gutenberg’s JavaScript unit and integration tests now use Vitest
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Gutenberg’s JavaScript unit and integration tests now use Vitest

**[Make WordPress Core](https://daily.dev/sources/wordpresscore)** · 5 min read · 0 upvotes · 0 comments

## Summary

Gutenberg's JavaScript unit and integration tests have migrated from Jest to Vitest, gaining native ESM support and real-browser component testing via Vitest's Browser Mode. Test filenames now determine environment: plain .test files run in Node, .jsdom.test files run in jsdom, and .browser.test files run in a real browser. @wordpress/scripts 36.0.0 makes Vitest the default for test-unit-js, with breaking changes to configuration, dependencies, and CLI options. Projects wanting to keep Jest can switch to the maintenance-only test-unit-jest command but must now install and configure Jest dependencies themselves, since @wordpress/jest-preset-default and @wordpress/jest-console are deprecated with no Vitest-based replacements planned.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://make.wordpress.org/core/2026/09/23/gutenbergs-javascript-unit-and-integration-tests-now-use-vitest>

## Questions this post answers

### How do I keep using Jest with wp-scripts after @wordpress/scripts 36.0.0 makes Vitest the default?

Switch Jest commands from wp-scripts test-unit-js to wp-scripts test-unit-jest, then install the required Jest dependencies directly since @wordpress/scripts no longer bundles Jest, its environment, or the WordPress Jest configuration and transformer. Existing tests and snapshots can remain on Jest, and test-unit-jest is a maintenance-only command with no scheduled removal.

_Teams weighing a Jest-to-Vitest migration can track breaking WordPress tooling changes like this on daily.dev._

### Are @wordpress/jest-preset-default and @wordpress/jest-console deprecated?

Yes, both packages are deprecated and will no longer receive updates, though their published versions remain available for existing Jest projects. No replacement @wordpress/vitest-preset-default or @wordpress/vitest-console packages are planned, since most of their functionality is now covered by Vitest's built-in features and configuration.

_Developers relying on deprecated WordPress packages can follow tooling shifts like this on daily.dev._

### How does Vitest select whether a test runs in Node, jsdom, or a real browser in Gutenberg's test setup?

Test filenames determine the environment: files matching *.test.* without a suffix run in Node by default, *.jsdom.test.* files run in jsdom for DOM structure and events, and *.browser.test.* files run in Vitest's Browser Mode for real CSS, layout, and browser-dependent interactions like focus and scrolling.

_Contributors restructuring JS test suites by environment can follow testing tool changes on daily.dev._

## Similar posts on daily.dev

- [Vitest 4 Browser Mode: Component Testing Without Playwright](https://daily.dev/posts/vitest-4-browser-mode-component-testing-without-playwright-yq6se15sw) · SitePoint · 1 upvotes · 0 comments
- [Vitest: an introduction](https://daily.dev/posts/vitest-an-introduction-9rhl06sca) · Flavio Copes · 2 upvotes · 0 comments
- [Comparing the best Node.js unit testing frameworks](https://daily.dev/posts/comparing-the-best-node-js-unit-testing-frameworks-ezow8yale) · LogRocket · 0 upvotes · 0 comments
- [Vitest Team Releases Version 4.0 with Stable Browser Mode and Visual Regression Testing](https://daily.dev/posts/vitest-team-releases-version-4-0-with-stable-browser-mode-and-visual-regression-testing-uwl1t6a06) · InfoQ · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#wordpress](https://daily.dev/tags/wordpress), [#jest](https://daily.dev/tags/jest), [#vitest](https://daily.dev/tags/vitest)

[View this post on daily.dev](https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Gutenberg’s JavaScript unit and integration tests now use Vitest","url":"https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl"},"datePublished":"2026-09-23T14:18:15.092Z","dateModified":"2026-09-23T14:18:38.803Z","description":"Gutenberg's JavaScript unit and integration tests have migrated from Jest to Vitest, gaining native ESM support and real-browser component testing via Vitest's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ad4f5b66be737a1618019916626b1bd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6ad4f5b66be737a1618019916626b1bd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Make WordPress Core","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Make WordPress Core","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/892d1a79e30e4e8a911b5726c6fb1a06","url":"https://daily.dev/sources/wordpresscore"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,wordpress,jest,vitest","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Make WordPress Core","item":"https://daily.dev/sources/wordpresscore"},{"@type":"ListItem","position":3,"name":"Gutenberg’s JavaScript unit and integration tests now use Vitest"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/gutenberg-s-javascript-unit-and-integration-tests-now-use-vitest-a3ahem6tl#faq","mainEntity":[{"@type":"Question","name":"How do I keep using Jest with wp-scripts after @wordpress/scripts 36.0.0 makes Vitest the default?","acceptedAnswer":{"@type":"Answer","text":"Switch Jest commands from wp-scripts test-unit-js to wp-scripts test-unit-jest, then install the required Jest dependencies directly since @wordpress/scripts no longer bundles Jest, its environment, or the WordPress Jest configuration and transformer. Existing tests and snapshots can remain on Jest, and test-unit-jest is a maintenance-only command with no scheduled removal. Teams weighing a Jest-to-Vitest migration can track breaking WordPress tooling changes like this on daily.dev."}},{"@type":"Question","name":"Are @wordpress/jest-preset-default and @wordpress/jest-console deprecated?","acceptedAnswer":{"@type":"Answer","text":"Yes, both packages are deprecated and will no longer receive updates, though their published versions remain available for existing Jest projects. No replacement @wordpress/vitest-preset-default or @wordpress/vitest-console packages are planned, since most of their functionality is now covered by Vitest's built-in features and configuration. Developers relying on deprecated WordPress packages can follow tooling shifts like this on daily.dev."}},{"@type":"Question","name":"How does Vitest select whether a test runs in Node, jsdom, or a real browser in Gutenberg's test setup?","acceptedAnswer":{"@type":"Answer","text":"Test filenames determine the environment: files matching *.test.* without a suffix run in Node by default, *.jsdom.test.* files run in jsdom for DOM structure and events, and *.browser.test.* files run in Vitest's Browser Mode for real CSS, layout, and browser-dependent interactions like focus and scrolling. Contributors restructuring JS test suites by environment can follow testing tool changes on daily.dev."}}]}
```

