Repository navigation
refactor: migrate tests/unit to npm workspace @wordpress/unit-tests #77063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
manzoorwanijk
merged 13 commits into
WordPress:trunk
from
USERSATOSHI:try/migrate-unit-tests-to-workspace
Apr 21, 2026
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
30f2622
refactor: migrate tests/unit to npm workspace
USERSATOSHI 6038804
chore: fixing jest config due to new relative path
USERSATOSHI ddad6bb
Merge branch 'WordPress:trunk' into try/migrate-unit-tests-to-workspace
USERSATOSHI 6c96249
Fix IS_GUTENBERG_PLUGIN detection in unit tests
USERSATOSHI cb1054d
Merge branch 'WordPress:trunk' into try/migrate-unit-tests-to-workspace
USERSATOSHI d60bf8d
chore: update tsconfig to make missing files work and revert gutenver…
USERSATOSHI bcd44f8
Merge branch trunk
USERSATOSHI 6ca0955
chore: removing changes that are not needed
USERSATOSHI e80dc8b
chore: update dependencies and improve test scripts; remove unused ts…
USERSATOSHI 76eb81d
chore: remove test/unit from tsconfig
USERSATOSHI 06b9d6a
chore: update deps
USERSATOSHI 1afb043
Explicitly declare the dependencies
manzoorwanijk 8d22cbc
Remove unused dependency from root
manzoorwanijk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "name": "@wordpress/unit-tests", | ||
| "version": "0.0.0", | ||
| "description": "Unit tests for WordPress Gutenberg.", | ||
| "private": true, | ||
| "author": "The WordPress Contributors", | ||
| "license": "GPL-2.0-or-later", | ||
| "keywords": [ | ||
| "wordpress", | ||
| "gutenberg", | ||
| "unit-tests" | ||
| ], | ||
| "homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/test/unit/README.md", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/WordPress/gutenberg.git", | ||
| "directory": "test/unit" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/WordPress/gutenberg/issues" | ||
| }, | ||
| "devDependencies": { | ||
| "@emotion/jest": "11.14.2", | ||
| "@testing-library/jest-dom": "6.9.1", | ||
| "@testing-library/react": "16.3.2", | ||
| "@testing-library/user-event": "14.6.1", | ||
| "@wordpress/scripts": "file:../../packages/scripts", | ||
| "babel-jest": "29.7.0", | ||
| "jest": "29.6.2", | ||
| "jest-environment-jsdom": "^30.2.0", | ||
|
manzoorwanijk marked this conversation as resolved.
Resolved
|
||
| "jest-jasmine2": "29.6.2", | ||
| "jest-junit": "13.0.0", | ||
| "jest-message-util": "^29.6.2", | ||
| "jest-watch-typeahead": "2.2.2", | ||
| "resize-observer-polyfill": "1.5.1", | ||
| "snapshot-diff": "0.10.0" | ||
|
manzoorwanijk marked this conversation as resolved.
Resolved
|
||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "scripts": { | ||
| "test:unit": "wp-scripts test-unit-js --config jest.config.js", | ||
| "test:unit:watch": "npm run test:unit -- --watch", | ||
| "test:unit:debug": "wp-scripts --inspect-brk test-unit-js --runInBand --no-cache --verbose --config jest.config.js" | ||
| } | ||
| } | ||
|
manzoorwanijk marked this conversation as resolved.
Resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/tsconfig.json", | ||
| "extends": "../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "checkJs": false, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "module": "CommonJS", | ||
| "noEmit": true, | ||
| // the following 5 lines are needed else the missing file errors shows up on build. If there is a better solution, update this config. | ||
| "composite": false, | ||
| "declaration": false, | ||
| "declarationMap": false, | ||
| "declarationDir": null, | ||
| "emitDeclarationOnly": false, | ||
| "rootDir": "../..", | ||
| "types": [ "node" ] | ||
| }, | ||
| "include": [ "." ], | ||
| "exclude": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.