Exclude JS/TS test files from build - #73495
Conversation
|
Flaky tests detected in 00c8b38. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19585254066
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| '**/*.native.*', | ||
| '**/*.ios.*', | ||
| '**/*.android.*', | ||
| '**/*.{spec,test}.*', |
There was a problem hiding this comment.
It might be good to sync "spec" variations into the entry above aimed at test folders, since I've also seen spec folders.
I randomly discovered this package the other day, and it looks awesome - love what y'all are building here! I started using it right away, although I realize it's early. :)
What?
When using
wp-buildon a project that has JS/TS tests where files are colocated with their source files (e.g./src/panel.test.tstests/src/panel.ts), the test files will currently be included in the outputbuilddir.Why?
An exclusion for them is missing in
IGNORE_PATTERNS. They're already ignored elsewhere, and other tests (entire folders) are already part ofIGNORE_PATTERNS, so maybe this is just a missing piece.Testing Instructions
*.test.tsor*.test.jsfile next to your source file.wp-build.buildfolder with and without this PR: Without, the*.test.jsfile will show - with, it won't (which is what we want).