Skip to content

chore: Add Makefiles for dev-packages to make it convenient to run tests#19203

Merged
andreiborza merged 4 commits intodevelopfrom
ab/dev-packages-makefiles
Feb 6, 2026
Merged

chore: Add Makefiles for dev-packages to make it convenient to run tests#19203
andreiborza merged 4 commits intodevelopfrom
ab/dev-packages-makefiles

Conversation

@andreiborza
Copy link
Member

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.

Alternatively, you can navigate to the specific dev-package (i.e. cd dev-packages/node-integration-tests) and run specific tests in there by using make.

This is for running specific tests/test-apps.

Screenshot.2026-02-06.at.12.04.12.mp4

Requires: fzf which you can install via brew install fzf

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.
@andreiborza andreiborza requested a review from JPeer264 February 6, 2026 11:09
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not run all the tests, fzf cancels out.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (2)

Fix in Cursor Fix in Web

@andreiborza andreiborza enabled auto-merge (squash) February 6, 2026 13:54
@andreiborza andreiborza merged commit 4d583ea into develop Feb 6, 2026
604 of 612 checks passed
@andreiborza andreiborza deleted the ab/dev-packages-makefiles branch February 6, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants