chore: Add Makefiles for dev-packages to make it convenient to run tests#19203
chore: Add Makefiles for dev-packages to make it convenient to run tests#19203andreiborza merged 4 commits intodevelopfrom
Conversation
You can now run specific e2e, browser-integration, node-integration and node-core-integration tests by using `make` inside `dev-packages`. Select the suite and you'll be given a fuzzy search prompt that you can type in to filter or use arrow keys to select the test you want to run. This is for running specific tests/test-apps.
Codecov Results 📊Generated by Codecov Action |
| exit 1; \ | ||
| fi | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs yarn test:run |
There was a problem hiding this comment.
Bug: Canceling the fzf test selection prompt unexpectedly runs all tests because the xargs command is missing the -r flag.
Severity: MEDIUM
Suggested Fix
Add the -r (or --no-run-if-empty) flag to the xargs command in the affected Makefile targets. This will ensure that if fzf provides no input (as happens on cancellation), the test command will not be executed. For example, ... | xargs yarn test:run should be changed to ... | xargs -r yarn test:run.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: dev-packages/e2e-tests/Makefile#L8
Potential issue: In several `Makefile` targets, the output of an `fzf` command is piped
to `xargs` to run a specific test. However, the `xargs` command is missing the `-r`
(`--no-run-if-empty`) flag. When a user cancels the `fzf` selection prompt (e.g., by
pressing ESC), `fzf` produces no output. Without the `-r` flag, `xargs` proceeds to
execute the test command (e.g., `yarn test:run`) with no arguments. This causes the test
runner's default behavior, which is to run all tests, contrary to the user's intent to
cancel the operation.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
It does not run all the tests, fzf cancels out.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| exit 1; \ | ||
| fi | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs yarn test:run |
There was a problem hiding this comment.
Missing xargs guard runs all tests on cancel
Medium Severity
Removing -r from xargs in the e2e Makefile (and omitting it in the new Makefiles) means that on Linux (GNU xargs), if the user cancels fzf (presses Escape), xargs still executes yarn test / yarn test:run with no arguments — unintentionally running the entire test suite. BSD xargs on macOS skips execution on empty input by default, but GNU xargs does not. The parent Makefile correctly guards against empty selection with [ -n "$$suite" ], but these sub-Makefiles lack a similar guard.


You can now run specific e2e, browser-integration, node-integration and node-core-integration tests by using
makeinsidedev-packages.Select the suite and you'll be given a fuzzy search prompt that you can type in to filter or use arrow keys to select the test you want to run.
Alternatively, you can navigate to the specific dev-package (i.e.
cd dev-packages/node-integration-tests) and run specific tests in there by usingmake.This is for running specific tests/test-apps.
Screenshot.2026-02-06.at.12.04.12.mp4
Requires:
fzfwhich you can install viabrew install fzf